aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 7cfe4693c1..40e00b55c2 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1061,16 +1061,22 @@ module ActionDispatch
end
end
- def actions
+ def available_actions
if only = @options[:only]
Array(only).map(&:to_sym)
- elsif except = @options[:except]
- default_actions - Array(except).map(&:to_sym)
else
default_actions
end
end
+ def actions
+ if except = @options[:except]
+ available_actions - Array(except).map(&:to_sym)
+ else
+ available_actions
+ end
+ end
+
def name
@as || @name
end