kemal-flash

Version, currently 0.3.04 versions

github.com/crystal-garage/kemal-flash

Temporary storage between actions in Kemal

3 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  kemal-flash:
    github: crystal-garage/kemal-flash
    version: ~> 0.3.0

Then run:

shards install

shard.yml

Crystal
>= 1.0.0
License
MIT
Authors
Rimas Silkaitis, Anton Maminov

Dependencies

Runtime Dependencies

  • kemal*github: kemalcr/kemal, branch: master
  • kemal-session>= 1.1.0github: kemalcr/kemal-session

Development Dependencies

  • ameba*github: crystal-ameba/amebadev
  • spec-kemal*github: kemalcr/spec-kemaldev

README

kemal-flash

Crystal CI GitHub release License

A fork of the kemal-flash library that I created because the original not working anymore and has not received any updates for a long time.

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-garage/kemal-flash
    branch: develop

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/crystal-garage/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