Sha256: 3f000284c3d786bf93269ddafceb65fc4db19fe3c9a07e9a09492a35508a26c3
Contents?: true
Size: 694 Bytes
Versions: 3
Compression:
Stored size: 694 Bytes
Contents
module PgEngine module FlashHelper def render_turbo_stream_flash_messages turbo_stream.prepend 'flash', partial: 'pg_layout/flash' end def render_turbo_stream_title # rubocop:disable Rails/SkipsModelValidations turbo_stream.update_all 'title', "#{breadcrumbs.last&.name} - #{Rails.application.class.module_parent_name}" # rubocop:enable Rails/SkipsModelValidations end def flash_type_to_class(flash_type) case flash_type when 'notice' 'info' when 'critical', 'alert' 'danger' when 'warning' 'warning' when 'success' 'success' else flash_type end end end end
Version data entries
3 entries across 3 versions & 1 rubygems