Class: ClientValidation::Util
- Inherits:
-
Object
- Object
- ClientValidation::Util
- Defined in:
- lib/client_validations/util.rb
Class Method Summary collapse
Class Method Details
.message_for(field_scope, key) ⇒ Object
3 4 5 6 7 |
# File 'lib/client_validations/util.rb', line 3 def self.(field_scope, key) field_name = I18n.translate(field_scope, {:scope => "activerecord.attributes"}) = I18n.translate(key, {:scope => 'activerecord.errors.messages'}) "#{field_name} #{message_text}" end |