This line:
post :create, :comment => @comment.attributes

The second parameter (hash) is the content of params in your controller. So
basically your params[:comment] would be @comment.attributes

So if you expected params[:user_id] then you should pass it to the post call

Ahmy Yulrizka


On Tue, Mar 27, 2012 at 7:47 PM, Neil Bye <[email protected]> wrote:

> Cpx Cpx wrote in post #1053539:
> > Check the params[:user_id] i think it was nil
> >
> > Ahmy Yulrizka
>
>
> So it is. How can I introduce a user in the fixtures or setup to give it
> a value?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

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

Reply via email to