Sha256: f4a48386aa11dcbf6cfde03188706405831e7f05f89dee41d24f08d0760074fd

Contents?: true

Size: 524 Bytes

Versions: 45

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

45 entries across 45 versions & 1 rubygems

Version Path
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
avo-3.13.7 app/controllers/concerns/avo/common_controller.rb
avo-3.13.6 app/controllers/concerns/avo/common_controller.rb
avo-3.13.5 app/controllers/concerns/avo/common_controller.rb
avo-3.13.4 app/controllers/concerns/avo/common_controller.rb
avo-3.13.3 app/controllers/concerns/avo/common_controller.rb
avo-3.13.2 app/controllers/concerns/avo/common_controller.rb
avo-3.13.1 app/controllers/concerns/avo/common_controller.rb
avo-3.13.0 app/controllers/concerns/avo/common_controller.rb
avo-3.12.0 app/controllers/concerns/avo/common_controller.rb
avo-3.11.10 app/controllers/concerns/avo/common_controller.rb
avo-3.11.9 app/controllers/concerns/avo/common_controller.rb
avo-3.11.8 app/controllers/concerns/avo/common_controller.rb