Jason B wrote:
Does the new Restful features of Edge support form validation?
I have “validates_presence_of :x” in my model, but rails spills it’s
beans with and error: “ActiveRecord::RecordInvalid”
What I’d it to do is return the form with the usual fieldWithErrors divs
Has anyone got this working?
the validates_presence_of :x will raise an ActiveRecord::RecordInvalid
exception if :x is not presence. You would have to catch the exception.
s = SomeRecord.new
redirect_back_or_default(:action => ‘done’)
render :action => ‘test’