fixes #750 - load hooks return ActiveRecord::Model in Rails 4, use Concern #751

Merged
merged 1 commit into from Sep 29, 2012

Conversation

Projects
None yet
3 participants

mculp commented Sep 28, 2012

@ryanb -- this seems to fix the load issue when running under Rails 4. Tests are passing. But should this be approached differently, specifically, should we be adding accessible_by to ActiveRecord::Model instead of Base?

Owner

ryanb commented Sep 28, 2012

Awesome thanks! I haven't had a chance to look into this yet. Is it backwards compatible with Rails 3?

mculp commented Sep 28, 2012

Yes, I tested with a Rails 3.2.8 app. Two changes:

  • don't call extend directly, as it's deprecated
  • put the class_eval/include code in an ActiveSupport.on_load(:active_record) block -- without this, I was getting the same deprecation warning
Collaborator

mikepack commented Sep 29, 2012

This looks good.

Thanks @mculp!!

ryanb merged commit f1cebde into ryanb:2.0 Sep 29, 2012

1 check passed

default The Travis build passed
Details
Owner

ryanb commented Sep 29, 2012

Merged in, thanks!

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