instance method to_s

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

to_s()

Converts the Cookie to its string representation.

Source
# File actionpack/lib/action_controller/cgi_ext/cookie.rb, line 69
    def to_s
      buf = ''
      buf << @name << '='
      buf << (@value.kind_of?(String) ? CGI::escape(@value) : @value.collect{|v| CGI::escape(v) }.join("&"))
      buf << '; domain=' << @domain if @domain
      buf << '; path=' << @path if @path
      buf << '; expires=' << CGI::rfc1123_date(@expires) if @expires
      buf << '; secure' if @secure
      buf << '; HttpOnly' if @http_only
      buf
    end

Defined in actionpack/lib/action_controller/cgi_ext/cookie.rb line 69 · View on GitHub · Improve this page · Find usages on GitHub

Defined in CGI::Cookie

Type at least 2 characters to search.

↑↓ navigate · open · esc close