kemal-flash

Temporary storage between actions in kemal kemal kemal-flash session flash-notifications
0.1.0 Latest release released

kemal-flash

kemal-flash provides a way to pass temporary information between actions. Anything that's placed in the flash will be cleared out at the end of the next action. kemal-flash depends on kemal-session. Make sure kemal-session is included before including kemal-flash.

Installation

Add this to your application's shard.yml:

dependencies:
  kemal-flash:
    github: neovintage/kemal-flash
    version: 0.1.0

Usage

require "kemal"
require "kemal-session"
require "kemal-flash"

get "/" do |env|
  env.flash["notice"] = "welcome"
end

get "/check_flash" do |env|
  env.flash["notice"]?
end

Contributing

  1. Fork it ( https://github.com/[your-github-name]/kemal-flash/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

kemal-flash:
  github: neovintage/kemal-flash
  version: ~> 0.1.0
License MIT
Crystal none

Authors

Dependencies 0

Development Dependencies 3

  • kemal 0.17.5
    {'github' => 'kemalcr/kemal', 'version' => '0.17.5'}
  • kemal-session master
    {'branch' => 'master', 'github' => 'kemalcr/kemal-session'}
  • spec-kemal 0.4.0
    {'github' => 'kemalcr/spec-kemal', 'version' => '0.4.0'}
Last synced .
search fire star recently