Sha256: cd788c93089882cb6f9f5824b34e5d842e46f1051ba49aa351e6ab1e8b89fdf8
Contents?: true
Size: 461 Bytes
Versions: 6
Compression:
Stored size: 461 Bytes
Contents
require "dry/view/context" module <%= config[:camel_cased_app_name] %> class ViewContext < Dry::View::Context def csrf_token self[:csrf_token] end def csrf_metatag self[:csrf_metatag] end def csrf_tag self[:csrf_tag] end def flash self[:flash] end def flash? %i[notice alert].any? { |type| flash[type] } end private def [](name) _options.fetch(name) end end end
Version data entries
6 entries across 6 versions & 2 rubygems