diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-14 13:57:44 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-14 13:57:44 +0000 |
commit | 55efae272065c66f2f10ab786c300213e910465c (patch) | |
tree | f059852987b09dba895022a4c6e59f2c60b793be /actionpack/lib | |
parent | a6e12c0c21159503cef99fa69be7a708a2d39ed9 (diff) | |
download | rails-55efae272065c66f2f10ab786c300213e910465c.tar.gz rails-55efae272065c66f2f10ab786c300213e910465c.tar.bz2 rails-55efae272065c66f2f10ab786c300213e910465c.zip |
Allow exempt_from_layout :rhtml. References #6742, closes #7026.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5927 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index dd061ce143..8a3cb3eec3 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1190,10 +1190,9 @@ module ActionController #:nodoc: end def template_exempt_from_layout?(template_name = default_template_name) - @@exempt_from_layout.any? { |ext| template_name =~ ext } or - @template.pick_template_extension(template_name) == :rjs - rescue - false + extension = @template.pick_template_extension(template_name) rescue nil + name_with_extension = !template_name.include?('.') && extension ? "#{template_name}.#{extension}" : template_name + extension == :rjs || @@exempt_from_layout.any? { |ext| name_with_extension =~ ext } end def assert_existence_of_template_file(template_name) |