1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Kasper Timm Hansen
4abe29d813 Replace expectation with state check.
The tests would still pass if the cache call in the rendered templates were removed.
2015-05-30 18:57:10 +02:00
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
Łukasz Strzałkowski
1538395d4c Remove unused fixtures and models from AP tests 2013-08-25 11:39:14 +02:00
Marcel Molina
3d1a30bc59 Ooops. Add fixture partials for last commit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8823 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-08 22:33:17 +00:00