aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/template/handlers
Commit message (Collapse)AuthorAgeFilesLines
* Freeze static arguments for gsubbrainopia2015-04-021-1/+1
|
* Prefer string patterns for gsubbrainopia2015-04-021-1/+1
| | | | | | | | | | | | | | | | | https://github.com/ruby/ruby/pull/579 - there is a new optimization since ruby 2.2 Previously regexp patterns were faster (since a string was converted to regexp underneath anyway). But now string patterns are faster and better reflect the purpose. Benchmark.ips do |bm| bm.report('regexp') { 'this is ::a random string'.gsub(/::/, '/') } bm.report('string') { 'this is ::a random string'.gsub('::', '/') } bm.compare! end # string: 753724.4 i/s # regexp: 501443.1 i/s - 1.50x slower
* Collections automatically cache and fetch partials.Kasper Timm Hansen2015-02-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | | Collections can take advantage of `multi_read` if they render one template and their partials begin with a cache call. The cache call must correspond to either what the collections elements are rendered as, or match the inferred name of the partial. So with a notifications/_notification.html.erb template like: ```ruby <% cache notification %> <%# ... %> <% end %> ``` A collection would be able to use `multi_read` if rendered like: ```ruby <%= render @notifications %> <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %> ```
* Some valid block calls in templates caused syntax errorsAkira Matsuda2014-11-201-1/+1
| | | | Now ActionView accepts <%= foo(){ %> and <%= foo()do %> :golf:
* Call gsub with a Regexp instead of a String for better performancePablo Herrero2014-11-011-1/+1
|
* handle <%== nil %> casesAaron Patterson2014-09-141-2/+2
| | | | | This is much less common than string literal appends, so add a special case method for it. Maybe fixes bug reported by @jeremy on 97ef636191933f1d4abc92fc10871e6d1195285c
* optimize string literals in erb templatesAaron Patterson2013-12-031-2/+2
|
* Remove require to AP stuff that leftŁukasz Strzałkowski2013-06-201-1/+0
|
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-203-0/+183