Hello,
I am creating a gem in which I need to add a new has_many
relationships:
...
included do |base|
base.has_many :foos
end
def some_method
self.foos #
end
...
Here Foo is a model I created and it is places in app/models/Foo.rb
I wonder if I can use syntax like the line marked with #?
If yes, I got NoMethodError for using "self.foos" when writing rspec
testing, is there any reason like forgeting to include some file of
raising such an error?
Thanks!
T
--
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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.