On Nov 5, 3:25 pm, kishoj <kis...@gmail.com> wrote:
> Thank you all for your warm response!!!
> I got the solution. Its something like below
>
> <% form_for [...@request, Comment.new] do |f| %>
>           <p>
>             <%= f.hidden_field :request_id, :value => @request.id %>
>           ...................................
>           </p>
>           
> .................................................................................
> <% end %>

You can avoid the hidden field if you setup a nested route for request/
##/comments.

http://guides.rubyonrails.org/routing.html#nested-resources

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to