On Tue, Nov 17, 2009 at 01:40:25PM -0800, Eric wrote:
> notes_controller:
> def create @note =
> Property.find(params[:id]).notes.create(params[:note]) ... end
I'm not sure I'm following this. If I follow a link from a property
view:
<%= link_to 'New note', new_note_path %>
how is Property.find(params[:id]).notes.create(params[:note]) going to
find @Property? I don't really understand how that's getting passed
along via params here.
--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"
--
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=.