Sha256: 95e9c783e3acb971b4bec6596f8bf21806b40988cd93689371489113fc1d20ce

Contents?: true

Size: 514 Bytes

Versions: 8

Compression:

Stored size: 514 Bytes

Contents

module PgEngine
  module FlashHelper
    def render_turbo_stream_flash_messages(to: nil)
      if to.present?
        turbo_stream.prepend_all to, partial: 'pg_layout/flash'
      else
        turbo_stream.prepend 'flash', partial: 'pg_layout/flash'
      end
    end

    def render_turbo_stream_title
      title = [breadcrumbs.last&.name, ActsAsTenant.current_tenant,
               I18n.t(Current.app_name, scope: 'app_name')].compact.join(' - ')
      turbo_stream.update_all 'title', title
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pg_rails-7.6.21.pre.11 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.10 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.9 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.8 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.7 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.6 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.5 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21.pre.4 pg_engine/app/helpers/pg_engine/flash_helper.rb