Module: Fields::OptionsSupport
- Extended by:
- ActiveSupport::Concern
- Included in:
- ControllerSupport
- Defined in:
- app/controllers/concerns/fields/options_support.rb
Instance Method Summary collapse
Instance Method Details
#assign_checkboxes(strong_params, attribute) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/controllers/concerns/fields/options_support.rb', line 4 def assign_checkboxes(strong_params, attribute) attribute = attribute.to_s if strong_params.dig(attribute).present? # filter out the placeholder inputs that arrive along with the form submission. strong_params[attribute] = strong_params[attribute].select(&:present?) end end |