Route question

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.

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 18 December 2011 18:07, Tomasz P. [email protected] 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs