flame flash
1.0.0
불꽃에 대한 플래시.
# Gemfile
gem 'flame-flash'
# config.ru
require 'flame-flash' # or `Bundler.require`
# _controller.rb
include Flame :: Flash <!-- layout.html.erb -->
<%
%i[ error warning notice ] . each do | type |
flash [ type ] . each do | text |
%>
< p class =" flash <%= type %> " >
<%= text %>
</ p >
<%
end
end
%> class PostsController < Flame :: Controller
def update
flash [ :error ] = "You don't have permissions"
redirect :show
end
def delete
redirect :show , notice : 'Deleted'
end
def move
redirect :index , flash : { success : 'Moved' }
end
def create
flash . now [ :error ] = 'Not enought permissions'
view :new
end
enderrorwarningnotice 레포를 확인한 후 bundle install 실행하여 종속성을 설치하십시오.
그런 다음 toys rspec 실행하여 테스트를 실행하십시오.
이 보석을 로컬 컴퓨터에 설치하려면 toys gem install 실행하십시오.
새 버전을 출시하려면 toys gem release %version% 실행하십시오. 여기서 어떻게 작동하는지보십시오.
Github에서 버그 보고서 및 풀 요청을 환영합니다.
보석은 MIT 라이센스의 조건에 따라 오픈 소스로 제공됩니다.