Sha256: 45b7d3331832df065c3dca675898fbefc8443957f1c880a3fd1c6ad350a247b4

Contents?: true

Size: 731 Bytes

Versions: 39

Compression:

Stored size: 731 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 _routes
      raise "In order to use #url_for, you must include routing helpers explicitly. " \
            "For instance, `include Rails.application.routes.url_helpers"
    end

    module ClassMethods
      def action_methods
        @action_methods ||= begin
          super - _routes.named_routes.helper_names
        end
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
actionpack-3.0.20 lib/action_controller/metal/url_for.rb
actionpack-3.0.19 lib/action_controller/metal/url_for.rb
actionpack-3.0.18 lib/action_controller/metal/url_for.rb
actionpack-3.0.17 lib/action_controller/metal/url_for.rb
actionpack-3.0.16 lib/action_controller/metal/url_for.rb
actionpack-3.0.15 lib/action_controller/metal/url_for.rb
actionpack-3.0.14 lib/action_controller/metal/url_for.rb
actionpack-3.0.13 lib/action_controller/metal/url_for.rb
actionpack-3.0.13.rc1 lib/action_controller/metal/url_for.rb
actionpack-3.0.12 lib/action_controller/metal/url_for.rb
actionpack-3.0.12.rc1 lib/action_controller/metal/url_for.rb
actionpack-3.0.11 lib/action_controller/metal/url_for.rb
actionpack-3.0.10 lib/action_controller/metal/url_for.rb
actionpack-3.0.10.rc1 lib/action_controller/metal/url_for.rb
actionpack-3.0.9 lib/action_controller/metal/url_for.rb
actionpack-3.0.9.rc5 lib/action_controller/metal/url_for.rb
actionpack-3.0.9.rc4 lib/action_controller/metal/url_for.rb
actionpack-3.0.9.rc3 lib/action_controller/metal/url_for.rb
actionpack-3.0.9.rc1 lib/action_controller/metal/url_for.rb
actionpack-3.0.8 lib/action_controller/metal/url_for.rb