I am trying to add some validation to protect against blank fields, but
it does not seem to want to work, here is how I am trying to do it:
<%= form_tag :action => ‘update’ %>
flash[:message] = ‘User was successfully updated.’
redirect_to :action => ‘index’
flash[:message] = ‘An error occurred!’
render :action => ‘edit’
validates_presence_of :username, :password, :firstname, :lastname,
:email, :address1, :postcode, :city, :country, :on => :create
validates_presence_of :firstname, :lastname, :email, :address1,
:postcode, :city, :country, :on => :update
but it updates the form successfully even with blanks!
Am I missing something?