| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Augments the collection caching with some instrumentation that's logged.
For collections that have been cached like:
```ruby
<%= render partial: 'notifications/notification', collection: @notifications, cached: true %>
```
We'll output a line showing how many cache hits we had when rendering it:
```
Rendered collection of notifications/_notification.html.erb [0 / 100 cache hits] (3396.5ms)
```
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having collection caching that wraps templates and automatically tries
to infer if they are cachable proved to be too much of a hassle.
We'd rather have it be something you explicitly turn on.
This removes much of the code and docs to explain the previous automatic
behavior.
This change also removes scoped cache keys and passing cache_options.
|
|
|
|
|
|
|
|
| |
Moves us closer to having access to a local template variable,
we can ask for eligibility and its virtual_path.
Currently we rely on `@template`, which we don't have available
when rendering collections without a fixed template.
|
|
|
|
|
| |
This commit fixes the bug convering `false` to `locals[as]` when
`options[:object]` is `false` (close #22260).
|
| |
|
|
|
|
|
|
|
| |
The thread_safe gem is being deprecated and all its code has been merged
into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly
the same as its predecessor except for fixes to two bugs discovered
during the merge.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When one rendered a partial template without specifying an object
or a collection (e.g. <%= render partial: 'partial_name' %>), Rails
would make an object called :partial_name available in local_assigns.
I don't think this was the intended behavior, since no local variable
called 'partial_name' gets defined in the view.
|
| |
|
|
|
|
|
|
|
|
| |
Makes caching a collection of template partials faster using `read_multi`
on the Rails cache store.
Some caching implementations have optimized `read_multi` so we don't have
to check in the cache store for every template.
|
|
|
|
| |
because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The "Rendering" word in the titles is not meant to be a link to
the documentation for ActionView::Rendering.
[ci skip]
|
|/
|
|
|
| |
before this PR IDENTIFIER_ERROR_MESSAGE could lead to misunderstand the convention of partial name.
Added OPTION_AS_ERROR_MESSAGE for unvalid charter in as option.
|
|
|
|
| |
Originally caused by #17771
|
|
|
|
|
|
|
|
|
|
|
|
| |
c67005f221f102fe2caca231027d9b11cf630484 made the local var in partials
available only if what passed to `:object` was truthy.
For example this would not make the local variable `foo` available inside the
partial:
render partial: 'foo', object: false
Fixes #17373.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This class is only used on the PartialRenderer.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The iteration object is available as the local variable
"template_name_iteration" when rendering partials with collections.
It gives access to the +size+ of the collection beeing iterated over,
the current +index+ and two convinicence methods +first?+ and +last?+
"template_name_counter" variable is kept but is deprecated.
[Joel Junström + Lucas Uyezu]
|
| |
|
|
|