diff options
author | Tom Stuart <tom@experthuman.com> | 2009-03-07 22:50:58 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-07 22:50:58 +0000 |
commit | 5c87e9adddc22703a3dbbb785e32fafe0e91ce78 (patch) | |
tree | 24e1700683cc88c3bdcbee9bd2f3eafd6761c38f /actionpack/lib/action_controller | |
parent | 74387884819e8b6e16c3f67388610b8d1192cb4d (diff) | |
download | rails-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/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/resources.rb | 4 |
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 |