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 [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