Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleaning up variable names to match method parameter names

  • Loading branch information...
commit 636405d2a6187cf1fe90f35b5e2945758afde160 1 parent 33543ac
@tenderlove tenderlove authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 actionpack/lib/action_dispatch/routing/mapper.rb
View
14 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1387,8 +1387,8 @@ def with_scope_level(kind, resource = parent_resource)
@scope[:scope_level_resource] = old_resource
end
- def resource_scope(level, resource) #:nodoc:
- with_scope_level(level, resource) do
+ def resource_scope(kind, resource) #:nodoc:
+ with_scope_level(kind, resource) do
scope(parent_resource.resource_scope) do
yield
end
@@ -1396,10 +1396,12 @@ def resource_scope(level, resource) #:nodoc:
end
def nested_options #:nodoc:
- {}.tap do |options|
- options[:as] = parent_resource.member_name
- options[:constraints] = { "#{parent_resource.singular}_id".to_sym => id_constraint } if id_constraint?
- end
+ options = { :as => parent_resource.member_name }
+ options[:constraints] = {
+ :"#{parent_resource.singular}_id" => id_constraint
+ } if id_constraint?
+
+ options
end
def id_constraint? #:nodoc:
Please sign in to comment.
Something went wrong with that request. Please try again.