1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/test/fixtures
Kasper Timm Hansen 11644fd0ce Collections automatically cache and fetch partials.
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 %>
```
2015-02-21 16:06:57 +01:00
..
actionpack Added PartialIteration class used when rendering collections 2014-07-16 14:50:51 -03:00
comments
custom_pattern
customers
db_definitions
developers
digestor Variants in ActionView::Digestor 2014-03-04 15:02:58 +01:00
fun
games
good_customers
helpers
helpers_missing
layout_tests/alt
layouts
mascots
multipart
override/test
override2/layouts/test
projects
public
replies
respond_to
test Collections automatically cache and fetch partials. 2015-02-21 16:06:57 +01:00
topics
translations/templates
_top_level_partial.html.erb
_top_level_partial_only.erb
companies.yml
company.rb
developer.rb
developers.yml
developers_projects.yml
mascot.rb
mascots.yml
plain_text.raw
plain_text_with_characters.raw
project.rb
projects.yml
replies.yml
reply.rb
ruby_template.ruby
shared.html.erb
topic.rb
topics.yml
with_format.json.erb