Skip to content

Temporary storage between actions in kemal

License

Notifications You must be signed in to change notification settings

crystal-china/kemal-flash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: crystal-china/kemal-flash
    version: 0.2.0

Usage

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. Run crystal spec for all spec pass
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Contributors

About

Temporary storage between actions in kemal

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Crystal 100.0%