Module: SimpleFormWithClientValidation::Components::Labels::ClassMethods
- Defined in:
- lib/simple_form_with_client_validation/components/labels.rb
Overview
:nodoc:
Instance Method Summary collapse
- #translate_required_html ⇒ Object
- #translate_required_mark ⇒ Object
- #translate_required_text ⇒ Object
Instance Method Details
#translate_required_html ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/simple_form_with_client_validation/components/labels.rb', line 7 def translate_required_html i18n_cache :translate_required_html do I18n.t(:"simple_form.required.html", :default => %[<abbr title="#{translate_required_text}">#{translate_required_mark}</abbr>] ) end end |
#translate_required_mark ⇒ Object
19 20 21 |
# File 'lib/simple_form_with_client_validation/components/labels.rb', line 19 def translate_required_mark I18n.t(:"simple_form.required.mark", :default => '*') end |
#translate_required_text ⇒ Object
15 16 17 |
# File 'lib/simple_form_with_client_validation/components/labels.rb', line 15 def translate_required_text I18n.t(:"simple_form.required.text", :default => 'required') end |