diff options
author | Grzegorz Ĺwirski <sognat@gmail.com> | 2013-04-01 15:06:36 +0200 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-04-10 08:13:16 +0100 |
commit | d50df2f116bfb1f3e897746fb345a5e945650e31 (patch) | |
tree | 839ab496404e012619b28c3180b28ff3ecd4f7d7 /actionpack/lib/action_controller | |
parent | 17a886b2759cb70ecebd174adeeac14e29bb8a11 (diff) | |
download | rails-d50df2f116bfb1f3e897746fb345a5e945650e31.tar.gz rails-d50df2f116bfb1f3e897746fb345a5e945650e31.tar.bz2 rails-d50df2f116bfb1f3e897746fb345a5e945650e31.zip |
Reverts rendering behavior when format is unknown
If a request has unknown format (eg. /foo.bar), the renderer
fallbacks to default format.
This patch reverts Rails 3.2 behavior after c2267db commit.
Fixes issue #9654.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index c5e7d4e357..eabc0fc230 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -6,7 +6,7 @@ module ActionController # Before processing, set the request formats in current controller formats. def process_action(*) #:nodoc: - self.formats = request.formats.map { |x| x.ref } + self.formats = request.formats.select { |x| !x.nil? }.map(&:ref) super end |