[Rails] Re: before filter question
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. 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
--
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 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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home