Hi
on the code below the validates all the form fields
if @client.save
flash[:notice] = ''Client was successfully created.''
redirect_to :action => ''list''
else
render :action => ''new''
end
how can I do this action without having to save the object?
ie
if validate
#move on to next stage
else
redner :action => new
end
--
Posted via http://www.ruby-forum.com/.
> how can I do this action without having to save the object? > > ie > > if validateif @client.valid? According ot the API docs: "Runs validate and validate_on_create or validate_on_update and returns true if no errors were added otherwise false". Julian -- Posted via http://www.ruby-forum.com/.