[Rails] inverse_of not supported in Rails 3 for has_many?
I was looking through the association classes in the rails 3 source and
noticed that we aren't supporting bi-directional associations with
has_many and belongs_to:
# NOTE - for now, we're only supporting inverse setting from
belongs_to back onto
# has_one associations.
def we_can_set_the_inverse_on_this?(record)
@reflection.has_inverse? && @reflection.inverse_of.macro ==
:has_one
end
Why wasn't that implemented, it doesn't seems much more difficult to
implement
than has_one and belongs_to.
I'm running rails 3.0.5.
--
Posted via http://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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home