I have the following setup for one of my entities:
property :name, String, :required => true, :unique => true,
:messages => {
:is_unique => "We already have that name in the
system."
}
I was wondering if there is a way I can customize the message further
by replacing "that name" in the :is_unique message with the actual
name the client attempted to insert. For example, if The Glue Factory
is already in the system and the client attempts to insert an entity
of the same type with name "The Glue Factory," it would be cool to
have the error message indicate "We already have The Glue Factory in
the system."
Thanks and Happy New Year.
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.