On Nov 16, 12:45 pm, "Todd A. Jacobs" <tjacobs-sndr-
b4f...@codegnome.org> wrote:
> On Mon, Nov 16, 2009 at 04:30:23AM -0800, Frederick Cheung wrote:
> > The error is telling you that you called property_path(nil) - for
> > whatever reason @note.property_id isn't set.
>
> Thanks. I had suspected as much, but still found the error rather
> opaque. Still, I don't understand *why* it's being unset, since I'm
> setting it explicitly in the property controller.
>
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) ?

Fred
> Rather than guessing at why, though, what I'd really like is a reliable
> mechanism to populate @note.property_id from the properties
> controller--or perhaps from the notes controller if I can somehow get at
> the referrer.
>
> Is there a way to call Note.new with arbitrary values?
>
> --
> "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