Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord deprecated finders are broken in 4.2 #16929

Conversation

stopdropandrew
Copy link
Contributor

References: rails/activerecord-deprecated_finders#25

Maintain compatibility for:

  • ActiveRecord::Base#find(:all)
  • ActiveRecord::Base#find(:first)
  • ActiveRecord::Base#find(:last)

I've got a solution and pointed a build at it. Viewable at Gemfile-edge @ https://travis-ci.org/kongregate/activerecord-deprecated_finders/builds/35390651.

@seuros
Copy link
Member

seuros commented Sep 16, 2014

I think we should not support the deprecated finders in 4.2 or at least patch the gem to work with 4.2

@matthewd
Copy link
Member

@seuros "It will be removed as a dependency in Rails 4.1, but users can manually include it in their Gemfile and it will continue to be maintained until Rails 5."

Agree we should fix this from the gem's side if at all feasible, however.

@senny senny added this to the 4.2.0 milestone Sep 16, 2014
@@ -128,7 +128,8 @@ def find(*ids)
primary_key.nil? ||
default_scopes.any? ||
columns_hash.include?(inheritance_column) ||
ids.first.kind_of?(Array)
ids.first.kind_of?(Array) ||
ids.first.kind_of?(Symbol)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you documented this code is to support deprecated_finders?

@stopdropandrew stopdropandrew force-pushed the fix-activerecord-deprecated_finders-find-symbol branch from 4f863d2 to 4845497 Compare September 16, 2014 16:40
Maintain compatibility for:
* ActiveRecord::Base#find(:all)
* ActiveRecord::Base#find(:first)
* ActiveRecord::Base#find(:last)
@stopdropandrew stopdropandrew force-pushed the fix-activerecord-deprecated_finders-find-symbol branch from 4845497 to 6a3626b Compare September 16, 2014 16:52
@stopdropandrew
Copy link
Contributor Author

Added comment and rebased.

rafaelfranca added a commit that referenced this pull request Sep 17, 2014
…_finders-find-symbol

ActiveRecord deprecated finders are broken in 4.2
@rafaelfranca rafaelfranca merged commit 8408796 into rails:master Sep 17, 2014
@rafaelfranca
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants