Ruby on Rails Saturday, September 3, 2011

On Sep 3, 6:14 am, 7stud -- <li...@ruby-forum.com> wrote:
> Frederick Cheung wrote in post #1019805:
>
> > On Sep 2, 1:49pm, 7stud -- <li...@ruby-forum.com> wrote:
>
> >>  User.find(params[:id]) will return user1
>
> >> I really don't care what happens in that case, and I don't understand
> >> why that would cause my tests to fail.
>
> > You're missing the point.
>
> Apparently.
>
> > The point is that in your tests params[:id]
> > isn't a string
>
> The term params[:id]  doesn't appear in my tests, so I have no idea what
> you are talking about.

I was talking about the value of params[:id] in your controller action
when the test is run.

>  And in the before filter, I've showed that
> params[:id] is a string:
>
> Session id: ****1****
> Sesssion id class: Fixnum
> Params id: ****3****
> Params id class: String

Was this output produced when running the tests or when using the page
from a browser?

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

No comments:

Post a Comment