Module: SimpleForm::Components::Labels::ClassMethods

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#translate_required_htmlObject



9
10
11
12
13
14
15
# File 'lib/simple_form/components/labels.rb', line 9

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



21
22
23
# File 'lib/simple_form/components/labels.rb', line 21

def translate_required_mark
  I18n.t(:"simple_form.required.mark", :default => '*')
end

#translate_required_textObject



17
18
19
# File 'lib/simple_form/components/labels.rb', line 17

def translate_required_text
  I18n.t(:"simple_form.required.text", :default => 'required')
end