Sha256: 2a418016f13f889889c408ee17be8b35187cfcdd38da4a08f9263bf066650204

Contents?: true

Size: 706 Bytes

Versions: 52

Compression:

Stored size: 706 Bytes

Contents

# By default Rails optimizes named routes and doesn't adds default_url_options, so we fix this.
ActionController::Base.send :helper_method, :default_url_options

ActionController::Routing::Optimisation::PositionalArguments.send :class_eval do
  def guard_conditions_with_def_url_opt
    guard_conditions_without_def_url_opt << "default_url_options(nil).blank?"
  end
  alias_method_chain :guard_conditions, :def_url_opt
end

ActionController::Routing::Optimisation::PositionalArgumentsWithAdditionalParams.send :class_eval do
  def guard_conditions_with_def_url_opt
    guard_conditions_without_def_url_opt << "default_url_options(nil).blank?"
  end
  alias_method_chain :guard_conditions, :def_url_opt
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
crystal-ext-0.0.3 lib/rails_ext/hacks/persistent_params.rb
crystal-ext-0.0.2 lib/rails_ext/hacks/persistent_params.rb
crystal-ext-0.0.1 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.29 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.28 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.27 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.25 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.24 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.23 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.22 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.21 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.20 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.19 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.18 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.17 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.16 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.15 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.14 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.13 lib/rails_ext/hacks/persistent_params.rb
rails-ext-0.3.12 lib/rails_ext/hacks/persistent_params.rb