aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/resources.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/resources.rb')
-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