Method: Binda::ComponentsHelper#prepare_description_for_form_hint

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

#prepare_description_for_form_hint(field_setting) ⇒ Object

Prepare description for form hint.

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:



23
24
25
26
27
28
29
# File 'app/helpers/binda/components_helper.rb', line 23

def prepare_description_for_form_hint(field_setting)
  if field_setting.description.blank?
    return false
  else
    return field_setting.description
  end
end