From 782583235d01caaefbdc24197b57623bc975d533 Mon Sep 17 00:00:00 2001 From: Earl J St Sauver Date: Sun, 8 Sep 2013 14:25:38 -0700 Subject: Blacklist refferenced in docs is actually whitelist The docs refference a blacklist, but really what's being described is a whitelist. Anything that matches the constraint gets through to the path. --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 288ce3e867..f4dd075153 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -432,10 +432,10 @@ module ActionDispatch # # match 'json_only', constraints: { format: 'json' } # - # class Blacklist + # class Whitelist # def matches?(request) request.remote_ip == '1.2.3.4' end # end - # match 'path', to: 'c#a', constraints: Blacklist.new + # match 'path', to: 'c#a', constraints: Whitelist.new # # See Scoping#constraints for more examples with its scope # equivalent. -- cgit v1.2.3 From be3b772bc6dbaec84cfd5cadb14288157db442b4 Mon Sep 17 00:00:00 2001 From: Earl J St Sauver Date: Sun, 8 Sep 2013 14:42:28 -0700 Subject: Change documentation to consistently refer to the same object The documentation in this section is referring to a profile, so the resource that's created should probably also be a profile of some sort. --- actionpack/lib/action_dispatch/routing/mapper.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f4dd075153..99e2987fea 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1066,18 +1066,18 @@ module ActionDispatch # a singular resource to map /profile (rather than /profile/:id) to # the show action: # - # resource :geocoder + # resource :profile # # creates six different routes in your application, all mapping to - # the +GeoCoders+ controller (note that the controller is named after + # the +Profiles+ controller (note that the controller is named after # the plural): # - # GET /geocoder/new - # POST /geocoder - # GET /geocoder - # GET /geocoder/edit - # PATCH/PUT /geocoder - # DELETE /geocoder + # GET /profile/new + # POST /profile + # GET /profile + # GET /profile/edit + # PATCH/PUT /profile + # DELETE /profile # # === Options # Takes same options as +resources+. -- cgit v1.2.3