Hello, I have such route file https://gist.github.com/1494045 In view I want to create path /user/subscriptions/9 with link_to(''Select'', user_subscriptions_path(package), :method => :put, :class => ''upgrade''), but instead I''m getting /user/ subscriptions.9, can someone point what I''m doing wrong here? I''m using rails 3.1.3. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 December 2011 18:07, Tomasz Pajor <tomek-P/LiwED5xL61Z/+hSey0Gg@public.gmane.org> wrote:> Hello, > > I have such route file https://gist.github.com/1494045 > In view I want to create path /user/subscriptions/9 with > link_to(''Select'', user_subscriptions_path(package), :method > => :put, :class => ''upgrade''), but instead I''m getting /user/ > subscriptions.9, can someone point what I''m doing wrong here?What does rake routes show? Colin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I don''t believe you can do this. user_subscriptions_path is such a rest way. You can put "resources :user_subscriptions" into your route file then you can use the helper method "user_subscriptions_path". Lewis On Dec 19, 2:07 am, Tomasz Pajor <to...-P/LiwED5xL61Z/+hSey0Gg@public.gmane.org> wrote:> Hello, > > I have such route filehttps://gist.github.com/1494045 > In view I want to create path /user/subscriptions/9 with > link_to(''Select'', user_subscriptions_path(package), :method > => :put, :class => ''upgrade''), but instead I''m getting /user/ > subscriptions.9, can someone point what I''m doing wrong here? > > I''m using rails 3.1.3.-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.