Sha256: 50203def7dfb9b84ff162a72ade45b1664e02be08132c60e24734f85bf4a31f8

Contents?: true

Size: 495 Bytes

Versions: 13

Compression:

Stored size: 495 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,
               PgEngine.site_brand.name].compact.join(' - ')
      turbo_stream.update_all 'title', title
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pg_rails-7.6.27 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.26 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.25 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.24 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.24.pre.5 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.24.pre.4 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.24.pre.3 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.23 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.22 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.22.pre.3 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.22.pre.2 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.22.pre.1 pg_engine/app/helpers/pg_engine/flash_helper.rb
pg_rails-7.6.21 pg_engine/app/helpers/pg_engine/flash_helper.rb