skip_relative_url_root url_for option is dead
This commit is contained in:
parent
1cc2a61ea6
commit
dcd110c724
|
@ -121,10 +121,10 @@ module ActionController #:nodoc:
|
||||||
if options.is_a?(Hash)
|
if options.is_a?(Hash)
|
||||||
if options[:action].is_a?(Array)
|
if options[:action].is_a?(Array)
|
||||||
options[:action].dup.each do |action|
|
options[:action].dup.each do |action|
|
||||||
self.class.expire_page(url_for(options.merge(:only_path => true, :skip_relative_url_root => true, :action => action)))
|
self.class.expire_page(url_for(options.merge(:only_path => true, :action => action)))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.class.expire_page(url_for(options.merge(:only_path => true, :skip_relative_url_root => true)))
|
self.class.expire_page(url_for(options.merge(:only_path => true)))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.class.expire_page(options)
|
self.class.expire_page(options)
|
||||||
|
@ -139,7 +139,7 @@ module ActionController #:nodoc:
|
||||||
|
|
||||||
path = case options
|
path = case options
|
||||||
when Hash
|
when Hash
|
||||||
url_for(options.merge(:only_path => true, :skip_relative_url_root => true, :format => params[:format]))
|
url_for(options.merge(:only_path => true, :format => params[:format]))
|
||||||
when String
|
when String
|
||||||
options
|
options
|
||||||
else
|
else
|
||||||
|
|
|
@ -403,7 +403,7 @@ module ActionDispatch
|
||||||
Generator.new(options, recall, @set, extras).generate
|
Generator.new(options, recall, @set, extras).generate
|
||||||
end
|
end
|
||||||
|
|
||||||
RESERVED_OPTIONS = [:anchor, :params, :only_path, :host, :protocol, :port, :trailing_slash, :skip_relative_url_root]
|
RESERVED_OPTIONS = [:anchor, :params, :only_path, :host, :protocol, :port, :trailing_slash]
|
||||||
|
|
||||||
def url_for(options)
|
def url_for(options)
|
||||||
options = default_url_options.merge(options || {})
|
options = default_url_options.merge(options || {})
|
||||||
|
|
|
@ -113,8 +113,6 @@ module ActionDispatch
|
||||||
# provided either explicitly, or via +default_url_options+.
|
# provided either explicitly, or via +default_url_options+.
|
||||||
# * <tt>:port</tt> - Optionally specify the port to connect to.
|
# * <tt>:port</tt> - Optionally specify the port to connect to.
|
||||||
# * <tt>:anchor</tt> - An anchor name to be appended to the path.
|
# * <tt>:anchor</tt> - An anchor name to be appended to the path.
|
||||||
# * <tt>:skip_relative_url_root</tt> - If true, the url is not constructed using the
|
|
||||||
# +relative_url_root+ set in ActionController::Base.relative_url_root.
|
|
||||||
# * <tt>:trailing_slash</tt> - If true, adds a trailing slash, as in "/archive/2009/"
|
# * <tt>:trailing_slash</tt> - If true, adds a trailing slash, as in "/archive/2009/"
|
||||||
#
|
#
|
||||||
# Any other key (<tt>:controller</tt>, <tt>:action</tt>, etc.) given to
|
# Any other key (<tt>:controller</tt>, <tt>:action</tt>, etc.) given to
|
||||||
|
|
|
@ -63,7 +63,7 @@ class PageCachingTest < ActionController::TestCase
|
||||||
@controller = PageCachingTestController.new
|
@controller = PageCachingTestController.new
|
||||||
@controller.cache_store = :file_store, FILE_STORE_PATH
|
@controller.cache_store = :file_store, FILE_STORE_PATH
|
||||||
|
|
||||||
@params = {:controller => 'posts', :action => 'index', :only_path => true, :skip_relative_url_root => true}
|
@params = {:controller => 'posts', :action => 'index', :only_path => true}
|
||||||
|
|
||||||
FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
|
FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
|
||||||
FileUtils.mkdir_p(FILE_STORE_PATH)
|
FileUtils.mkdir_p(FILE_STORE_PATH)
|
||||||
|
|
Loading…
Reference in New Issue