On Mon, Nov 16, 2009 at 05:46:57AM -0800, Frederick Cheung wrote:

> You're not really - you're setting it in the new method, but not in
> the create one (or are you using the nested attributes stuff) ?

If I call 

    @note = @property.notes.new

from the console, it properly populates the property_id and passes it
onto the note object. I've been trying this different ways, and maybe I
don't really understand what's being called when I do it via the web.

At present, I'm calling this from the properties controller, rather than
the notes controller, in the show action (which is where I have embedded
the New Note form). I'm not sure how to do it in notes.new or
notes.create, since I don't understand how to propogate the parent ID to
the notes controller from the property controller that way.

Can you offer a practical snippet for me to try?

-- 
"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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to