On Mar 23, 11:01 am, cult hero <[email protected]> wrote:
> I don't know if it's bundler or some oddity that has to do with how
> Rails does things, but actually... it appears I was wrong. Running
> Sequel::Model.plugin :active_model doesn't appear to do anything
> inside Rails 3. In fact, unless I'm totally botching the way plugins
> work, it doesn't appear to work in Ramaze either or just running from
> IRB.
>
> None of the class or instance methods become available to my models or
> to Sequel::Model itself. Am I just missing something obvious or what?
>
> For what it's worth, Sequel::Model.plugin :active_model returns nil.
>
> (Incidentally, auto loading works fine, but the Rails console handles
> the loading when items are initially called which is different than
> what I've been used to.)

You need to be sure that Sequel::Model.plugin :active_model is called
before the model subclasses are loaded.  Sequel uses a copy on create
design philosophy for model classes, so once the subclass is created,
changes to the parent class are independent of changes to subclasses
created previously.

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