Hi Everyone,
I've just uploaded a patch that allows you to do:
Person.find(:all, :conditions => { :university => victoria_wellington })
i.e leave off the "_id" for belongs_to associations (specify the
association name rather than the foreign key).
Looking for comments, suggestions and hopefully +1's. :)
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/467-hash-conditions-belongs_to-sugar
(The obvious thing to do is expand that syntax out to cover all
assocation types, but I thought I'd start small).
Cheers!
Nik
--
Nik Wakelin
Code to Customer
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---