aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/routing_url_for.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make AC::Parameters not inherited from HashPrem Sichanugrist2015-07-151-0/+10
| | | | | | | | This is another take at #14384 as we decided to wait until `master` is targeting Rails 5.0. This commit is implementation-complete, as it guarantees that all the public methods on the hash-inherited Parameters are still working (based on test case). We can decide to follow-up later if we want to remove some methods out from Parameters.
* move _generate_paths_by_default to where it is usedAaron Patterson2015-03-011-0/+6
| | | | | _generate_paths_by_default wasn't used in AD::Routing::UrlFor, so we should be able to move it where it is used in AV::Routing
* let mailer templates generate URLs by default [Xavier Noria, Richard Schneeman]Xavier Noria2014-11-241-8/+25
|
* Perf optimization for `url_for` called w/ Hashschneems2014-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | Benchmarking the existing code: ```ruby { :only_path => options[:host].nil? }.merge!(options.symbolize_keys)) ``` Against optimized code, that does not require a new hash or a merge: ```ruby options = options.symbolize_keys options[:only_path] = options[:host].nil? unless options.key?(:only_path) options ``` We see a statistically significant performance gain: ![](https://www.dropbox.com/s/onocpc0zfw4kjxl/Screenshot%202014-08-14%2012.45.30.png?dl=1) Updated to not mutate incoming parameters
* use the helper method builder to construct helper methodsAaron Patterson2014-05-121-2/+6
|
* probably should not check in a raiseAaron Patterson2014-05-121-1/+0
|
* undo optimized calls until the builder object is finishedAaron Patterson2014-05-121-4/+3
|
* fix url_for with classesAaron Patterson2014-05-121-1/+1
|
* break each polymorphic type to it's own methodAaron Patterson2014-05-121-1/+5
|
* split nil / Hash cases in url_forAaron Patterson2014-04-301-4/+4
| | | | | | | this reduces the number of comparisons and method calls `url_for` requires. The nil case no longer calls `symbolize_keys`, we already know options is nil, so no more ||=, and since it is nil we already know that options[:host] will be nil too.
* Take Hash with options inside Array in #url_forAndrey Ognevsky2013-11-151-0/+2
|
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-0/+107