README.md in futurism-1.2.0.pre7 vs README.md in futurism-1.2.0.pre8
- old
+ new
@@ -19,10 +19,11 @@
- [API](#api)
- [Resource](#resource)
- [Explicit Partial](#explicit-partial)
- [HTML Options](#html-options)
- [Eager Loading](#eager-loading)
+ - [Bypassing](#bypassing)
- [Broadcast Partials Individually](#broadcast-partials-individually)
- [Contextual Placeholder Arguments](#contextual-placeholder-arguments)
- [Events](#events)
- [Installation](#installation)
- [Manual Installation](#manual-installation)
@@ -173,10 +174,23 @@
<%= futurize 'some_tab', eager: true, extends: :tr do %>
<div class="placeholder"</td>
<% end %>
```
+### Bypassing
+
+In some rare cases, e.g. when combined with CableReady's async `updates_for` mechanism, you'll want to bypass futurism entirely and fall back to native `rendering`. You can do this by passing an `unless` option:
+
+```erb
+<%= futurize 'some_tab', unless: bypass_futurism?, extends: :tr do %>
+ <div class="placeholder"</td>
+<% end %>
+```
+
+Internally, this works the same as [bypassing futurism in tests](#testing)
+
+
### Broadcast Partials Individually
Futurism's default behavior is to `broadcast` partials as they are generated in batches:
On the client side, `IntersectionObserver` events are triggered in a debounced fashion, so several `render`s are performed on the server for each of those events. By default, futurism will group those to a single `broadcast` call (to save server CPU time).
@@ -186,10 +200,10 @@
<%= futurize @posts, broadcast_each: true, extends: :tr do %>
<div class="placeholder"</td>
<% end %>
```
-## Contextual Placeholder Arguments
+### Contextual Placeholder Arguments
For individual models or arbitrary collections, you can pass `record` and `index` to the placeholder block as arguments:
```erb
<%= futurize @post, extends: :div do |post| %>