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

use ActiveSupport.on_load to hook into Active Record #719

Conversation

y-yagi
Copy link
Contributor

@y-yagi y-yagi commented Sep 3, 2016

For avoiding autoloading these constants too soon.
This affect the initialization of Active Record.
Ref: rails/rails#23589 (comment)

For avoiding autoloading these constants too soon.
This affect the initialization of Active Record.
Ref: rails/rails#23589 (comment)
@jonatack jonatack merged commit 441cdf7 into activerecord-hackery:master Sep 4, 2016
@jonatack
Copy link
Contributor

jonatack commented Sep 4, 2016

Thanks @y-yagi!

jonatack added a commit that referenced this pull request Sep 4, 2016
@y-yagi
Copy link
Contributor Author

y-yagi commented Sep 4, 2016

@jonatack Thank you for your confirmation!

@y-yagi y-yagi deleted the use_on_load_to_hook_into_active_record branch September 4, 2016 20:46
@jdguzman
Copy link

I think this commit may have broken the mongoid adapter

@jdguzman
Copy link

could we just add a bindable.rb to the mongoid adapter and override is_alias_attribute? to return false?

@y-yagi
Copy link
Contributor Author

y-yagi commented Sep 16, 2016

Thank you pointed out! I think you are correct. I will fix.

y-yagi added a commit to y-yagi/ransack that referenced this pull request Sep 16, 2016
In activerecord-hackery#719, the definition of `Ransack::SUPPORTS_ATTRIBUTE_ALIAS` has changed when
Active Record is loaded.

In the impact, `Ransack::SUPPORTS_ATTRIBUTE_ALIAS` in mongo adapter has become no longer be defined,
modify to defined in mongoid adapter.

Follow up to activerecord-hackery#719
prasadsurase pushed a commit to prasadsurase/ransack that referenced this pull request Sep 22, 2016
@jonatack
Copy link
Contributor

Thank you @jdguzman for reporting.

@ypresto
Copy link

ypresto commented Jan 23, 2017

This affects my rails 5 project, any plans for releasing this..?

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

Successfully merging this pull request may close these issues.

4 participants