Sha256: aadf8a89640af29019cb97ac48d25f6b65a4393c8d9fc95a075a4b175e6c6da9

Contents?: true

Size: 572 Bytes

Versions: 2

Compression:

Stored size: 572 Bytes

Contents

module ActionController
  module UrlFor
    extend ActiveSupport::Concern

    include ActionDispatch::Routing::UrlFor

    def url_options
      super.reverse_merge(
        :host => request.host_with_port,
        :protocol => request.protocol,
        :_path_segments => request.symbolized_path_parameters
      ).merge(:script_name => request.script_name)
    end

    def _router
      raise "In order to use #url_for, you must include the helpers of a particular " \
            "router. For instance, `include Rails.application.routes.url_helpers"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
actionpack-3.0.0.beta3 lib/action_controller/metal/url_for.rb
actionpack-3.0.0.beta2 lib/action_controller/metal/url_for.rb