Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
FIX description on selection fields
Browse files Browse the repository at this point in the history
  • Loading branch information
a-barbieri committed Feb 1, 2018
1 parent f5d2845 commit ec16942
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/helpers/binda/components_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def prepare_description_for_form_hint(field_setting)
# @param field_setting [Binda::FieldSetting] The field setting object
def prepare_description_for_selections_form_hint(field_setting)
description = []
if field_setting.description.blank? && field_setting.allow_null?
description << field_setting.description
description << I18n.t("binda.null_is_not_allowed") if !field_setting.allow_null?
unless field_setting.description.blank? && field_setting.allow_null?
description << field_setting.description unless field_setting.description.blank?
description << I18n.t("binda.null_is_not_allowed") if !field_setting.allow_null?
return description.join('. ')
else
return false
Expand Down

0 comments on commit ec16942

Please sign in to comment.