thanks!
--
You received this message because you are subscribed to the Google
Groups "MongoMapper" group.
For more options, visit this group at
http://groups.google.com/group/mongomapper?hl=en?hl=en
validates_presence_of :name,
:message => lambda
{ I18n.translate("activerecord.errors.messages.blank") }
validates_uniqueness_of :slug,
:message => lambda
{ I18n.translate("activerecord.errors.messages.taken") },
:case_sensitive => false
Cheers
-- Jamie van Dyke
The problem is that Validatable seems to create it's own human_name
without calling the model method :
full_messages << humanize(attribute.to_s) + " " + msg
def humanize(lower_case_and_underscored_word) #:nodoc:
lower_case_and_underscored_word.to_s.gsub(/_id$/, "").gsub(/_/,
" ").capitalize
end
Do you know how to deal with in an elegant way ?
Thank you,
Emilien