search for: comments_path

Displaying 4 results from an estimated 4 matches for "comments_path".

2007 Aug 09
7
Integrating polymorphic models into controllers views? how?
I''m having trouble trying to get this to work. How the heck do you get a polymorphic controller to work? Especially integrating it with a view? Let''s say that we have shows, and episodes, then comments. A show has many episodes, an episode has many comments. the route is /shows/1/episodes/1/ Now to add a comment to that episode, how would I do it? Let''s say that the
2010 Apr 23
2
link_to with resource routes in helper file?
Hey all! Any pointers on doing something like: link_to "Comments", comments_path from within a helper file just like you can do from a view? Thanks in advance! -- 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....
2009 Apr 05
1
[cucumber] Nested resource in paths.rb
...or "the list of comments for Question For Nice Rspec Users" in paths.rb? What I''m asking about in particular is how to extract the "Question For Nice Rspec Users" part and use it to find the blogpost I created earlier and thus generate the path from a nested route e.g. comments_path(blogpost). Many thanks in advance. - Morten -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090405/d22085c2/attachment.html>
2007 Dec 16
0
pass the model type to the action via a hidden field?
...s/her comments: <%= link_to "add a comment", :action => "add", :controller => "comments", :value => @user %> Do I pass an instance of the user object through the value=>@user above? Here is my comments add page: <% form_for( :comment, :url => comments_path ) do |f | -%> <%= f.text_field :title %> <%= f.text_field :comment %> <%= f.hidden_field ''commentable'', ''commentable'', :value => @user %> <%= f.hidden_field ''commentable'', ''commentable_id'',...