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 หลังจากตรวจสอบ repo แล้วให้เรียกใช้ bundle install เพื่อติดตั้งการพึ่งพา
จากนั้นเรียกใช้ toys rspec เพื่อเรียกใช้การทดสอบ
ในการติดตั้งอัญมณีนี้ลงในเครื่องในพื้นที่ของคุณให้ใช้ toys gem install
หากต้องการเปิดตัวเวอร์ชันใหม่ Run toys gem release %version% ดูว่ามันทำงานอย่างไรที่นี่
รายงานข้อผิดพลาดและคำขอดึงยินดีต้อนรับบน GitHub
อัญมณีมีให้เป็นโอเพ่นซอร์สภายใต้ข้อกำหนดของใบอนุญาต MIT