Monday, August 29, 2011

[Rails] Re: Weird assignment problem, very confused :(

inspect returns:

ruby-1.9.2-p180 :009 > DocType.all.map {|d| d.name.inspect}
DocType Load (1.4ms) SELECT "doc_types".* FROM "doc_types"
=> ["\"127.0.0.1\"", "\"127.0.0.1\""]

and as above find only returns on of them (the one using
request.remote_ip


On 29 Aug., 20:06, Alexey Muranov <li...@ruby-forum.com> wrote:
> What does `User.first.ip.inspect` return in the two cases?
>
> --
> 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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate