Module: SimpleFormWithClientValidation::Components::Labels::ClassMethods

Defined in:
lib/simple_form_with_client_validation/components/labels.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#translate_required_htmlObject



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_markObject



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_textObject



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