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@googlegroups.com.
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.

Search Discussions

  • Colin Law at Dec 19, 2011 at 10:49 am

    On 18 December 2011 18:07, Tomasz Pajor 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@googlegroups.com.
    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.
  • Lewisou at Dec 20, 2011 at 8:59 am
    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 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@googlegroups.com.
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 19, '11 at 10:46a
activeDec 20, '11 at 8:59a
posts3
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase