custom validations errors form controller inside other parent controller rails 3.1
I have a House model in my rails app that has_many deals. I am displaying these deals on the house's show page. When I submit the form everything works fine if is with redirect_to; however, if there are validation errors on the Deal model, then my system not working fine. If there are validation errors on the Deal model. In my routes.rb I have resources :houses do resources :deals end In deals_controller.rb I have the next method create: def create @house = House.find_by_slug(params[:house_id]) @deal = @house.deals.build(params[:deal]) @deal.user = current_user respond_to do |format| if @deal