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% . انظر كيف يعمل هنا.
تقارير الأخطاء وطلبات السحب هي موضع ترحيب على جيثب.
الجوهرة متوفرة كمصدر مفتوح بموجب شروط ترخيص معهد ماساتشوستس للتكنولوجيا.