How can I get the validates_presence_of() on a validation error
render a partial instead of looking for a full action template.
I get the following error:
ActionController::MissingTemplate (Missing template ./script/../
config/..//app/views//listings/newReview.rhtml):
for the following methods:
class ListingsController < ApplicationController
def newReview
@review = Review.new
render(:partial => ''newReview'')
end
def createReview
@review = Review.new(params[:review])
@review.listing = @session[:listing]
if @review.save
flash[:notice] = ''Review was successfully created''
render(:partial => ''showReview'', :id => @review)
else
render(:action => ''newReview'')
end
end
end
being used with form_remote_tag() to update a multi-part submission.
This works great unless I use validates_presence_of() in the Review
model which errors trying to render a full template instead of re-
rendering the newReview() partial.
Thanks
Andrew