aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-05-06 12:16:55 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-05-06 12:16:55 +0100
commit63e8bcaeb31443cecc5bef5762a45643cc12d481 (patch)
tree57800132eecace875b1701b79883d179dfb8c021 /actionpack/lib
parent4a0118d7278687b534edf1e1184d6858cb4d29b8 (diff)
parente520fd5db7cb839b862c03647effee50f9223d98 (diff)
downloadrails-63e8bcaeb31443cecc5bef5762a45643cc12d481.tar.gz
rails-63e8bcaeb31443cecc5bef5762a45643cc12d481.tar.bz2
rails-63e8bcaeb31443cecc5bef5762a45643cc12d481.zip
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/resources.rb8
-rw-r--r--actionpack/lib/action_view/base.rb2
2 files changed, 4 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb
index f686d78ee3..26f75780c1 100644
--- a/actionpack/lib/action_controller/resources.rb
+++ b/actionpack/lib/action_controller/resources.rb
@@ -524,11 +524,9 @@ module ActionController
resource.member_methods.each do |method, actions|
actions.each do |action|
action_options = action_options_for(action, resource, method)
- action_path = action
- if resource.options[:path_names]
- action_path = resource.options[:path_names][action]
- action_path ||= Base.resources_path_names[action] || action
- end
+
+ action_path = resource.options[:path_names][action] if resource.options[:path_names].is_a?(Hash)
+ action_path ||= Base.resources_path_names[action] || action
map.named_route("#{action}_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}#{resource.action_separator}#{action_path}", action_options)
map.named_route("formatted_#{action}_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}#{resource.action_separator}#{action_path}.:format",action_options)
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index a6da81de07..d32c6fbe35 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -185,7 +185,7 @@ module ActionView #:nodoc:
attr_internal :request
delegate :request_forgery_protection_token, :template, :params, :session, :cookies, :response, :headers,
- :flash, :logger, :to => :controller
+ :flash, :logger, :action_name, :to => :controller
module CompiledTemplates #:nodoc:
# holds compiled template code