Cpx Cpx wrote in post #1053588:
> 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
:user_id is one of the attributes
setup do
@comment = comments(:hello)
@comment.commenter = "cleb"
@comment.body = "hello"
@comment.user_id = 1
end
Neil
--
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.