Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neovintage/kemal-flash
Temporary storage between actions in kemal
https://github.com/neovintage/kemal-flash
flash-notifications kemal kemal-flash session
Last synced: about 2 months ago
JSON representation
Temporary storage between actions in kemal
- Host: GitHub
- URL: https://github.com/neovintage/kemal-flash
- Owner: neovintage
- License: mit
- Created: 2017-01-06T19:29:01.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-02T10:58:26.000Z (over 1 year ago)
- Last Synced: 2024-11-02T13:42:17.287Z (2 months ago)
- Topics: flash-notifications, kemal, kemal-flash, session
- Language: Crystal
- Size: 11.7 KB
- Stars: 10
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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`:
```yaml
dependencies:
kemal-flash:
github: neovintage/kemal-flash
version: 0.1.0
```## Usage
```crystal
require "kemal"
require "kemal-session"
require "kemal-flash"get "/" do |env|
env.flash["notice"] = "welcome"
endget "/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
- [[neovintage]](https://github.com/neovintage) Rimas Silkaitis - creator, maintainer