Sha256: 906fad52584270c58b2e652a8ef72b2900c7160673a82f27d5c7156e8d00ffc9

Contents?: true

Size: 846 Bytes

Versions: 6

Compression:

Stored size: 846 Bytes

Contents

class DummyController < ApplicationController

  include CacheableFlash

  def index
    flash[:errors] = "This is an Error"
    flash[:notice] = "This is a Notice"
  end

  def error
    flash[:errors] << "Error ##{params[:id]}" # Cold boot the flash!
  end

  def no_flash
    # Does not set any flash
  end

  def multiple_keys
    flash[:notice] = 'This is a Notice'
    flash[:errors] = 'This is an Error'
    render :text => 'Foo'
  end

  def override
    flash[:notice] = 'original'
    flash[:notice] = 'message'
    render :text => 'Foo'
  end

  def stack
    flash[:notice] = 'original'
    flash[:notice] << 'message'
    flash[:notice] << 'another'
    render :text => 'Foo'
  end

  def cold_boot
    flash[:notice] << 'original'
    flash[:notice] << 'message'
    flash[:notice] << 'another'
    render :text => 'Foo'
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cacheable_flash-1.0.0 spec/dummy/app/controllers/dummy_controller.rb
cacheable_flash-0.3.4 spec/dummy/app/controllers/dummy_controller.rb
cacheable_flash-0.3.3 spec/dummy/app/controllers/dummy_controller.rb
cacheable_flash-0.3.2 spec/dummy/app/controllers/dummy_controller.rb
cacheable_flash-0.3.1 spec/dummy/app/controllers/dummy_controller.rb
cacheable_flash-0.3.0 spec/dummy/app/controllers/dummy_controller.rb