diff options
author | John Hawthorn <john@hawthorn.email> | 2019-03-18 10:12:41 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-03-18 11:10:52 -0700 |
commit | c555e28a4cf3690a95b5ed108d174f39cedd19b1 (patch) | |
tree | 4c089513e5fb87ce11790ae55c0f04f3f8a70e9b /actionview/lib/action_view | |
parent | 98d0f93506b0b97804d0d510ffcc435af9b2a2d5 (diff) | |
download | rails-c555e28a4cf3690a95b5ed108d174f39cedd19b1.tar.gz rails-c555e28a4cf3690a95b5ed108d174f39cedd19b1.tar.bz2 rails-c555e28a4cf3690a95b5ed108d174f39cedd19b1.zip |
Ignore nil in LookupContext#formats=
This also removes the mutation we were performing on the values being
passed in.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/lookup_context.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index 2eaf188ecf..a0a2d41948 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -280,6 +280,7 @@ module ActionView # add :html as fallback to :js. def formats=(values) if values + values = values.compact values.concat(default_formats) if values.delete "*/*" if values == [:js] values << :html |