On a model I have the following simple validator:
def validate
unless name && name =~ /^\w+$/
errors.add_to_base(“Name is missing”)
end
end
I would like to display a custom message on my views, without using the
helper <%= error_messages_for “table” %>
Where the messages from errors.add_to_base are stored and how to access
them in the views?