Sha256: f4a48386aa11dcbf6cfde03188706405831e7f05f89dee41d24f08d0760074fd

Contents?: true

Size: 524 Bytes

Versions: 57

Compression:

Stored size: 524 Bytes

Contents

module Avo
  module CommonController
    def default_url_options
      result = super.dup
      result[:force_locale] = params[:force_locale]

      extra_default_url_options.each do |param_name|
        result[param_name] = params[param_name]
      end

      result.compact
    end

    def extra_default_url_options
      block_or_array = Avo.configuration.default_url_options
      if block_or_array.respond_to?(:call)
        instance_eval(&block_or_array)
      else
        block_or_array
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
avo-3.16.5 app/controllers/concerns/avo/common_controller.rb
avo-3.16.4 app/controllers/concerns/avo/common_controller.rb
avo-3.16.3 app/controllers/concerns/avo/common_controller.rb
avo-3.16.2 app/controllers/concerns/avo/common_controller.rb
avo-3.16.1 app/controllers/concerns/avo/common_controller.rb
avo-3.16.0 app/controllers/concerns/avo/common_controller.rb
avo-3.15.7 app/controllers/concerns/avo/common_controller.rb
avo-3.15.6 app/controllers/concerns/avo/common_controller.rb
avo-3.15.5 app/controllers/concerns/avo/common_controller.rb
avo-3.15.4 app/controllers/concerns/avo/common_controller.rb
avo-3.15.3 app/controllers/concerns/avo/common_controller.rb
avo-3.15.2 app/controllers/concerns/avo/common_controller.rb
avo-3.15.1 app/controllers/concerns/avo/common_controller.rb
avo-3.15.0 app/controllers/concerns/avo/common_controller.rb
avo-3.14.5 app/controllers/concerns/avo/common_controller.rb
avo-3.14.4 app/controllers/concerns/avo/common_controller.rb
avo-3.14.3 app/controllers/concerns/avo/common_controller.rb
avo-3.14.2 app/controllers/concerns/avo/common_controller.rb
avo-3.14.1 app/controllers/concerns/avo/common_controller.rb
avo-3.14.0 app/controllers/concerns/avo/common_controller.rb