diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-10-21 15:18:36 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-18 10:51:10 -0800 |
commit | 636405d2a6187cf1fe90f35b5e2945758afde160 (patch) | |
tree | 38b002dd0ca3fd8c44a8d112887fe8b2386c2324 /actionpack/lib/action_dispatch/routing/mapper.rb | |
parent | 33543ac87148cfdd5b1917a0698bccaf55690e28 (diff) | |
download | rails-636405d2a6187cf1fe90f35b5e2945758afde160.tar.gz rails-636405d2a6187cf1fe90f35b5e2945758afde160.tar.bz2 rails-636405d2a6187cf1fe90f35b5e2945758afde160.zip |
cleaning up variable names to match method parameter names
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 91220e1cf7..4fc0d78267 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1387,8 +1387,8 @@ module ActionDispatch @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 @@ module ActionDispatch 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: |