项目作者: imdrasil

项目描述 :
Simple framework-agnostic flash message container.
高级语言: Crystal
项目地址: git://github.com/imdrasil/flash_container.cr.git
创建时间: 2019-01-04T20:39:54Z
项目社区:https://github.com/imdrasil/flash_container.cr

开源协议:MIT License

下载


flash_container

Simple framework-agnostic flash message container.

Installation

  1. Add the dependency to your shard.yml:
    1. dependencies:
    2. flash_container:
    3. github: imdrasil/flash_container.cr
  2. Run shards install

Usage

  1. require "flash_container"
  2. # Load flash messages from session
  3. flash = FlashContainer.from_session(session.string?(FlashContainer.key))
  4. flash[:notice] = "Some message"
  5. # Write messages back to session
  6. session.string(FlashContainer.key, flash.to_session)

Contributing

  1. Fork it (https://github.com/imdrasil/flash_container.cr/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

Inspired by Amber::Router::Flash::FlashStore.