This is interesting,

it doesn't work because if you call
member,

the resource mapper call member_scope, which in turn yield

# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 503
def member_scope
  "#{path}/:id"end


but the new is very special method, it call new_scope which in turn yield

# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 507
def new_scope(new_path)
  "#{path}/#{new_path}"end

http://rubydoc.info/docs/rails/3.0.0/ActionDispatch/Routing/Mapper/Resources#shallow-instance_method

Ahmy Yulrizka


On Mon, Dec 20, 2010 at 4:44 PM, Mahmoud Said <[email protected]>wrote:

> it won't work, it will be
>
> add_new_priority GET    /priorities/new/add(.:format)    {:action=>"add",
> :controller=>"priorities"}
>
>
> however, the collection plural  form seems more logical to me, you are
> adding a priority to priorities. so you are actually acting on priorities
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to