On Mar 23, 3:25 pm, cult hero <[email protected]> wrote:
> Nope, it's not Rails magic.
>
> Here's why I was having the same issues before:
>
> If I manually require 'active_model' (in Rails or IRB or wherever) and
> then load the plugin, I get the issue. (It wasn't the 5 terminal
> windows!)
>
> So, in IRB:
>
> >> require 'sequel'
> => true
> >> require 'active_model'
> => true
> >> Sequel::Model.plugins
>
> => [Sequel::Model, Sequel::Model::Associations]>> Sequel::Model.plugin 
> :active_model
> => nil
> >> Sequel::Model.plugins
>
> => [Sequel::Model, Sequel::Model::Associations, ActiveModel]

I think I see the problem.  See
http://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/plugins.rb#L67

If ActiveModel is already loaded, Sequel::Plugins::ActiveModel is the
same as ::ActiveModel, and sequel/plugins/active_model is never
required.  Try the patch at http://pastie.org/883806.txt.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to