Module: FormtasticTristateRadio::I18n::Error::Base

Included in:
FormtasticTristateRadio::I18n::Error
Defined in:
lib/formtastic_tristate_radio/i18n/error.rb

Instance Method Summary collapse

Instance Method Details

#messageString

Note:

In you have ActiveAdmin installed, it will give you YAML example for ActiveAdmin as well, otherwise only for Formtastic

Returns error message with YAML examples for the “unset” label translation lookup error.

Returns:

  • (String)

    error message with YAML examples for the “unset” label translation lookup error

See Also:



32
33
34
35
36
37
38
39
# File 'lib/formtastic_tristate_radio/i18n/error.rb', line 32

def message
  msg = []
  msg << "Add translations for the “unset” radio label"
  msg << ["For radiobutton labels in forms:", EXAMPLE_FORMTASTIC].join("\n")
  msg << "Note: “yes”, “no” and some other reserved words are converted into Boolean values in YAML, so you need to quote or symbolize them."
  msg << ["For ActiveAdmin status tags in index & view tables:", EXAMPLE_ACTIVEADMIN].join("\n") if !!defined?(ActiveAdmin)
  [super, msg.join("\n\n")].join("\n\n")
end