def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(: super when :back controller.request.env["HTTP_REFERER"] || 'javasc else polymorphic_path(options) end end
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(: puts "===========================" puts self.class.ancestors super when :back controller.request.env["HTTP_REFERER"] || 'javasc else polymorphic_path(options) end end
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(: puts "===========================" puts self.class.ancestors super when :back controller.request.env["HTTP_REFERER"] || 'javasc else polymorphic_path(options) end end
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(: puts "===========================" puts self.class.ancestors super when :back controller.request.env["HTTP_REFERER"] || 'javasc else polymorphic_path(options) end end
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(:only puts "===========================" self.class.ancestors.each do |klass| next unless klass.method_defined?(:url_for) puts klass.instance_method(:url_for).source_locatio end super when :back controller.request.env["HTTP_REFERER"] || 'javascript else polymorphic_path(options)
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(:only puts "===========================" self.class.ancestors.each do |klass| next unless klass.method_defined?(:url_for) puts klass.instance_method(:url_for).source_locatio end super when :back controller.request.env["HTTP_REFERER"] || 'javascript else polymorphic_path(options)
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(:only puts "===========================" self.class.ancestors.each do |klass| next unless klass.method_defined?(:url_for) puts klass.instance_method(:url_for).source_locatio end super when :back controller.request.env["HTTP_REFERER"] || 'javascript else polymorphic_path(options)
def url_for(options = {}) options ||= {} case options when String options when Hash options = options.symbolize_keys.reverse_merge!(:only puts "===========================" self.class.ancestors.each do |klass| next unless klass.method_defined?(:url_for) puts klass.instance_method(:url_for).source_locatio end super when :back controller.request.env["HTTP_REFERER"] || 'javascript else polymorphic_path(options)
====================== actionpack-3.2.12/lib/action_view/helpers/url_helper.rb 100 actionpack-3.2.12/lib/action_view/helpers/url_helper.rb 100 actionpack-3.2.12/lib/action_view/helpers/url_helper.rb 100 actionpack-3.2.12/lib/action_dispatch/routing/url_for.rb 143 One of these things is not like the others
Verify Caller def url_for(options = nil) puts "===========================" puts caller.inspect case options when String options when nil, Hash _routes.url_for((options || {}).symbolize_keys.rev else polymorphic_url(options) end end
Follow the Source def url_for(options = nil) case options when String options when nil, Hash puts "===========================" puts _routes.method(:url_for).source_location _routes.url_for((options || {}).symbolize_keys.rev else polymorphic_url(options) end end