Method: Binda::ComponentsHelper#prepare_description_for_selections_form_hint

Defined in:
app/helpers/binda/components_helper.rb

#prepare_description_for_selections_form_hint(field_setting) ⇒ Object

Prepare description for form hint belonging to select, radio and checkbox fields.

This helper return the field description (as ‘string`) or false (as `boolean`)

in order to tell Simple Form whether to generate or not the hint html tag.

Parameters:



38
39
40
41
42
43
44
# File 'app/helpers/binda/components_helper.rb', line 38

def prepare_description_for_selections_form_hint(field_setting)
  unless field_setting.description.blank? && field_setting.allow_null?
    prepare_description_for_selections_from_hint_with(field_setting)
  else
    return false 
  end
end