Rob,

Are you saying I need to do a

1 - require 'validation_group' in my User.rb

2 - Then add

ActiveRecord::Base.class_eval { extend
ValidationGroup::ActiveRecord::ActsMethod }
to my User.rb?

Thanks
On Aug 23, 12:44 pm, Rob Biedenharn <[email protected]>
wrote:
> I suspect that after you require validation_group.rb you want to have  
> something like:
>
> ActiveRecord::Base.class_eval { extend  
> ValidationGroup::ActiveRecord::ActsMethod }
>
> You need to get the "validation_group" method into ActiveRecord::Base  
> and therefore User before you call it.
>
> -Rob
>
> On Aug 23, 2010, at 3:22 PM, badnaam wrote:
>
>
>
> >http://pastie.org/1110631
>
> > On Aug 23, 12:15 pm, Marnen Laibow-Koser <[email protected]> wrote:
> >> badnaam wrote:
> >>> I created a module  MyModule "my_module.rb" and put in a lib  
> >>> folder in
> >>> my rails app.
>
> >>> In my User.rb model I call include MyModule.
>
> >>> When I try to use a method inside MyModule I get an "undefined  
> >>> method
> >>> error". How do I include this module in the model?
>
> >> What you described should work.  Let's see code.
>
> >>> Thanks
>
> >> Best,
> >> --
> >> Marnen Laibow-Koserhttp://www.marnen.org
> >> [email protected]
>
> >> Sent from my iPhone
>
> >> --
> >> Posted viahttp://www.ruby-forum.com/.
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "Ruby on Rails: Talk" group.
> > To post to this group, send email to rubyonrails-
> > [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected]
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/rubyonrails-talk?hl=en
> > .
>
> Rob Biedenharn          
> [email protected]      http://AgileConsultingLLC.com/
> [email protected]        http://GaslightSoftware.com/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: 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/rubyonrails-talk?hl=en.

Reply via email to