aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-12-19 04:41:57 +0000
committerRick Olson <technoweenie@gmail.com>2006-12-19 04:41:57 +0000
commite7c2c7982f25edcc359a3d6753bf41def1fc161e (patch)
treec4f862d25266e05319655e22e4793faeeb73dd65 /actionpack/lib
parent41466a4c83e3e590b580d5d2cbc5869e601e7599 (diff)
downloadrails-e7c2c7982f25edcc359a3d6753bf41def1fc161e.tar.gz
rails-e7c2c7982f25edcc359a3d6753bf41def1fc161e.tar.bz2
rails-e7c2c7982f25edcc359a3d6753bf41def1fc161e.zip
Ensure render :json => ... skips the layout. Closes #6808 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/layout.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb
index f6d687bd10..0d0a843e33 100644
--- a/actionpack/lib/action_controller/layout.rb
+++ b/actionpack/lib/action_controller/layout.rb
@@ -266,7 +266,7 @@ module ActionController #:nodoc:
def candidate_for_layout?(options)
(options.has_key?(:layout) && options[:layout] != false) ||
- options.values_at(:text, :xml, :file, :inline, :partial, :nothing).compact.empty? &&
+ options.values_at(:text, :xml, :json, :file, :inline, :partial, :nothing).compact.empty? &&
!template_exempt_from_layout?(default_template_name(options[:action] || options[:template]))
end