Class: Trestle::Mobility::Fields::CheckBox
- Inherits:
-
Form::Fields::CheckBox
- Object
- Form::Fields::CheckBox
- Trestle::Mobility::Fields::CheckBox
- Defined in:
- lib/trestle/mobility/fields/check_box.rb
Instance Method Summary collapse
Instance Method Details
#field ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/trestle/mobility/fields/check_box.rb', line 5 def field label = [:label] || name.to_s.humanize locales = [:locales] || I18n.available_locales.sort selected = [:selected] || Trestle.config.mobility.selected.call || locales.first @template.render partial: "trestle/mobility/check_box", locals: { field_name: name, label: label, locales: locales, selected: selected } end |