the output for the above lines is:
String
127.0.0.1 (.ip)
127.0.0.1 (.ip.to_s)
127.0.0.1 "#{d.ip}"
"127.0.0.1" ip.inspect
no idea what this could be else... the size is 9 in all examples
On 29 Aug., 23:12, sol <ch.bl...@gmail.com> wrote:
> 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 usingrequest.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.
No comments:
Post a Comment