No explanation needed
# https://x.com/y/1?page=1
# + current_url( :page => 3 )
# = https://x.com/y/1?page=3
def current_url(overwrite={})
url_for :only_path => false, :params => params.merge(overwrite)
end
Building web applications and fighting the daily madness
No explanation needed
# https://x.com/y/1?page=1
# + current_url( :page => 3 )
# = https://x.com/y/1?page=3
def current_url(overwrite={})
url_for :only_path => false, :params => params.merge(overwrite)
end
1 comment
Comments feed for this article
2011-01-28 at 0:59:44
Matt N
Thanks for this, it helped me work around the
verwrite_params deprecation warning for url_for().