Skip to content

Repository files navigation

Flame Flash

Cirrus CI - Base Branch Build StatusCodecov branchDepfuInline docsGemLicense

Flashes for Flame.

Usage

# Gemfilegem'flame-flash'# config.rurequire'flame-flash'# or `Bundler.require`# _controller.rbincludeFlame::Flash
<!-- layout.html.erb --><%%i[errorwarningnotice].eachdo |type|
flash[type].eachdo |text|
%><pclass="flash <%=type%>"><%=text%></p><%endend%>

Examples

classPostsController < Flame::Controllerdefupdateflash[:error]="You don't have permissions"redirect:showenddefdeleteredirect:show,notice: 'Deleted'enddefmoveredirect:index,flash: {success: 'Moved'}enddefcreateflash.now[:error]='Not enought permissions'view:newendend

Reserved keys

  • error
  • warning
  • notice

Development

After checking out the repo, run bundle install to install dependencies.

Then, run toys rspec to run the tests.

To install this gem onto your local machine, run toys gem install.

To release a new version, run toys gem release %version%. See how it works here.

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The gem is available as open source under the terms of the MIT License.

About

Flash plugin for Flame-framework

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages