On Oct 18, 12:15 am, ryan8720 <[email protected]> wrote:

>
> This is odd to me, because when add_rooms first renders, it shows the
> house_id. I don't understand why it isn't passed after the form is
> submitted.

Well from a cursory glance of your form, @house is nil because nowhere
do you pass an :id parameter, so you end up doing @house = House.find
(nil)
If I'm reading correctly the first time the form is rendered you're in
the add_room action so house ends up being derived from params[:room]
[:house_id] but in add_rooms @house is retrieved differently.

Fred

--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to