K. R. wrote:
> Why do you really want to render the show method of schools_controller? 
> Do you not render the new-action of the schools_controller? the bad form 
> was send from the new action of the schools controller isn't it?
> 
> format.html { render :action => "new", :controller => 'schools' }
> 

I'm pretty confused now as to how to do this. I'm hopig from one 
controller to another and maybe that's my problem (I shouldn't do this 
perhaps).

The show in Schools is what I'd like, reason is this....

I setup the up with Schools and Reviews controllers

I edit the Schools show action so that it display a form allowing 
reviews to be submitted (submits to the reviews via the line above

@review = @school.reviews.build(params[:review])

works fine.

Under the form on the Schools show page I display all the reviews for 
that school.. @School.reviews

works fine.

Thing is, when I introduce validation to the review model (presence of 
first_name for example), it doesnt work - I'd like it when the 
validation failed to return to the schools controller show method and 
display the error?

Any insight appreciated.
-- 
Posted via http://www.ruby-forum.com/.

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