Seems to be working now!
On Jun 22, 5:50 pm, steve odom
<steve.o...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I''m trying to create a link_to_remote whereby it takes me to the
> CREATE action of a polymorphic model (points). Ex:
>
> <%= link_to_remote "up", :url => comment_points_path(item),
:method
> => :post %>
>
> That takes me to the show action in the points controller instead of
> create.
>
> The routing looks something like:
> ----
> map.resources :comments do |comment|
> comment.resources :points, :name_prefix =>
''comment_''
> end
> map.resources :articles do |article|
> article.resources :points, :name_prefix =>
''article_''
> end
>
> ---
>
> Can I do this using a restful route or will I have to do it long hand
> (:url => {:controller => "points", :action =>
"create", :comment_id =>
> item.id }? I figure I''ve got something slightly off.
>
> Thanks,
>
> Steve
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---