Arrrr! I see...sorry being dopey, just enhance the render command - I
read you can do this elesewhere...
BUT, It still deosnt work!
class ReviewsController < ApplicationController
def create
@school = School.find(params[:school_id])
@review = @school.reviews.build(params[:review])
if @review.save
redirect_to @school
else
render :action => "show", :controller => "schools" # here....!!!!
end
end
end
===== it's trying to go here...
Showing app/views/reviews/show.html.erb where line #42 raised:
undefined method `edit_review_path' for #<ActionView::Base:0x21c2260>
It should go back to here I suppose...
http://localhost:3000/schools/2
--
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
-~----------~----~----~----~------~----~------~--~---