aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/rendering.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-11-21 03:30:06 +0100
committerXavier Noria <fxn@hashref.com>2010-11-21 03:30:06 +0100
commit6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52 (patch)
tree96bd668692b62d3829322232877b70c9011ce446 /actionpack/lib/abstract_controller/rendering.rb
parentf326221c701e4f9d991e3eadcc793a73795fb218 (diff)
parent7c51d1fcf9dc504c2dfd6e7184bbe8186f09819d (diff)
downloadrails-6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52.tar.gz
rails-6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52.tar.bz2
rails-6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/abstract_controller/rendering.rb')
-rw-r--r--actionpack/lib/abstract_controller/rendering.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb
index 475785a4b4..91b75273fa 100644
--- a/actionpack/lib/abstract_controller/rendering.rb
+++ b/actionpack/lib/abstract_controller/rendering.rb
@@ -119,7 +119,7 @@ module AbstractController
controller_path
end
- private
+ private
# This method should return a hash with assigns.
# You can overwrite this configuration per controller.
@@ -128,7 +128,7 @@ module AbstractController
hash = {}
variables = instance_variable_names
variables -= protected_instance_variables if respond_to?(:protected_instance_variables)
- variables.each { |name| hash[name.to_s[1..-1]] = instance_variable_get(name) }
+ variables.each { |name| hash[name.to_s[1, name.length]] = instance_variable_get(name) }
hash
end
@@ -138,13 +138,13 @@ module AbstractController
case action
when NilClass
when Hash
- options, action = action, nil
+ options = action
when String, Symbol
action = action.to_s
key = action.include?(?/) ? :file : :action
options[key] = action
else
- options.merge!(:partial => action)
+ options[:partial] = action
end
options