Sha256: fc4801a4a0f5e8b318637f2be74488d1272d5cd115c71a6d615faf230f0c92c1

Contents?: true

Size: 546 Bytes

Versions: 11

Compression:

Stored size: 546 Bytes

Contents

module PgEngine
  module DefaultUrlOptions
    # Aunque parece intuitivo que se podría definir solamente url_options,
    # es importante que default_url_options también esté definido
    def url_options
      if Current.active_user_account
        super.merge(tid: Current.active_user_account.to_param)
      else
        super.merge(tid: nil)
      end
    end

    def default_url_options
      if Current.active_user_account
        { tid: Current.active_user_account.to_param }
      else
        { tid: nil }
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pg_rails-7.6.21.pre.11 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.10 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.9 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.8 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.7 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.6 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.5 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.4 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.3 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.2 pg_engine/app/lib/pg_engine/default_url_options.rb
pg_rails-7.6.21.pre.1 pg_engine/app/lib/pg_engine/default_url_options.rb