Yeap, got it. Thanks for clearing that up Radhames

On Oct 14, 8:32 pm, radhames brito <rbri...@gmail.com> wrote:
> On Thu, Oct 14, 2010 at 5:43 AM, Christian Fazzini <
>
> christian.fazz...@gmail.com> wrote:
> > I think you mean:
>
> >   �...@comment = Comment.new
> >   �...@comment.user_id = @painting.user_id # Or your desire value...
> >   �...@comment.painting_id = @painting.id
>
> > MUST be in the comment controller, create action. Not new or show
> > action....
>
> yes it has to be in the create action of the comment controller and also you
> have to fetch the painting data so pass it in a hidden field on the form.
>
>   �...@comment = Comment.new
>
>   �...@comment.user_id = @painting.user_id # Or your desire value...
>   �...@comment.painting_id = @painting.id

-- 
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