i’m having a problem getting ahold of the validation error message.
mileage model:
validates_presence_of :title
mileage controller:
def create
if @mileage.save
redirect_to :action => ‘list’
else
redirect_to :action => ‘new’
end
end
def new
#stuff here
end
new.rhtml
<%= error_messages_for “mileage” %>
#also tried <%= error_messages_for :mileage %>
new.rhtml is displayed, but no error message is displayed.
what am i doing wrong?
tia…