Skip to content

Commit

Permalink
handle missing fields param values
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 2, 2019
1 parent e6c4925 commit bb71bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/concerns/fieldable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def fields_from_params(params)
fields = params.to_unsafe_h.dig(:fields)
return nil unless fields.is_a?(Hash)

fields.each { |k, v| fields[k] = v.split(",") }
fields.each { |k, v| fields[k] = v.to_s.split(",") }
fields
end
end
Expand Down

0 comments on commit bb71bb3

Please sign in to comment.