I got two models; film model is the parent and the review model is the child. I expect the following code to direct me back to the film interface:
def create
@film = Film.find(params[:film_id])
@review = @film.reviews.new(review_params)
if @review.save
redirect_to film_path(@film)
else
render "films/#{@film.id}"
end
end
It renders me back to the following address: films/22/reviews when it suppose to direct me back to the same interface (films/22)?
I want to return back to the same interface so i can post the errors the user has made?