lib/gemcache/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb
# To add a member route, add a member block into the resource block:
#
#   resources :photos do
#     member do
#       get 'preview'
#     end
#   end
#
# This will recognize <tt>/photos/1/preview</tt> with GET, and route to the
# preview action of +PhotosController+. It will also create the
# <tt>preview_photo_url</tt> and <tt>preview_photo_path</tt> helpers.
To add a member route, add a member block into the resource block:
resources :photos do
member do
get 'preview'
end
end

This will recognize /photos/1/preview with GET, and route to the
preview action of +PhotosController+. It will also create the
preview_photo_url and preview_photo_path helpers.
To add a member route add a member block into the resource block : resources : photos do member do get ' preview ' end end This will recognize / photos / 1 / preview with GET and route to the preview action of + PhotosController + . It will also create the preview_photo_url and preview_photo_path helpers .
def member
          unless resource_scope?
            raise ArgumentError, "can't use member outside resource(s) scope"
          end
          with_scope_level(:member) do
            scope(parent_resource.member_scope) do
              yield
            end
          end
        end
def member unless resource_scope? raise ArgumentError , "can't use member outside resource(s) scope" end with_scope_level ( :member ) do scope ( parent_resource . member_scope ) do yield end end end
To add a member route, add a member block into the resource block:
resources :photos do
member do
get 'preview'
end
end
To add a member route add a member block into the resource block : resources : photos do member do get ' preview ' end end