Sha256: d886122edeb68d8c3a5f3850b10040f0c455b5128665266965cf86b7201e5d05

Contents?: true

Size: 380 Bytes

Versions: 13

Compression:

Stored size: 380 Bytes

Contents

require "#{File.dirname(__FILE__)}/abstract_note"

module Footnotes
  module Notes
    class CookiesNote < AbstractNote
      def initialize(controller)
        @cookies = (controller.__send__(:cookies) || {}).symbolize_keys
      end

      def title
        "Cookies (#{@cookies.length})"
      end

      def content
        escape(@cookies.inspect)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
ceritium-rails-footnotes-3.4.1.1 lib/rails-footnotes/notes/cookies_note.rb
ceritium-rails-footnotes-3.4.1 lib/rails-footnotes/notes/cookies_note.rb
ceritium-rails-footnotes-3.4 lib/rails-footnotes/notes/cookies_note.rb
josevalim-rails-footnotes-3.3.1 lib/notes/cookies_note.rb
josevalim-rails-footnotes-3.3.2 lib/notes/cookies_note.rb
josevalim-rails-footnotes-3.4.1 lib/rails-footnotes/notes/cookies_note.rb
josevalim-rails-footnotes-3.4 lib/rails-footnotes/notes/cookies_note.rb
josevalim-rails-footnotes-3.5.0 lib/rails-footnotes/notes/cookies_note.rb
lexrupy-rails-footnotes-3.3.2 lib/rails-footnotes/notes/cookies_note.rb
lexrupy-rails-footnotes-3.4.1 lib/rails-footnotes/notes/cookies_note.rb
lexrupy-rails-footnotes-3.4 lib/rails-footnotes/notes/cookies_note.rb
scharfie-rails-footnotes-3.5.0 lib/rails-footnotes/notes/cookies_note.rb
scharfie-rails-footnotes-3.4.2 lib/rails-footnotes/notes/cookies_note.rb