aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorTom Stuart <tom@experthuman.com>2009-03-07 22:50:58 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-07 22:50:58 +0000
commit5c87e9adddc22703a3dbbb785e32fafe0e91ce78 (patch)
tree24e1700683cc88c3bdcbee9bd2f3eafd6761c38f /actionpack/lib
parent74387884819e8b6e16c3f67388610b8d1192cb4d (diff)
downloadrails-5c87e9adddc22703a3dbbb785e32fafe0e91ce78.tar.gz
rails-5c87e9adddc22703a3dbbb785e32fafe0e91ce78.tar.bz2
rails-5c87e9adddc22703a3dbbb785e32fafe0e91ce78.zip
Ensure shallow routes respects namespace [#1356 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/resources.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb
index 8195b38685..0a89c4b3d5 100644
--- a/actionpack/lib/action_controller/resources.rb
+++ b/actionpack/lib/action_controller/resources.rb
@@ -91,7 +91,7 @@ module ActionController
end
def shallow_path_prefix
- @shallow_path_prefix ||= "#{path_prefix unless @options[:shallow]}"
+ @shallow_path_prefix ||= @options[:shallow] ? @options[:namespace].try(:sub, /\/$/, '') : path_prefix
end
def member_path
@@ -103,7 +103,7 @@ module ActionController
end
def shallow_name_prefix
- @shallow_name_prefix ||= "#{name_prefix unless @options[:shallow]}"
+ @shallow_name_prefix ||= @options[:shallow] ? @options[:namespace].try(:gsub, /\//, '_') : name_prefix
end
def nesting_name_prefix