futurism 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c74426f9853a4805efb25ac42eebc0304d463146910b29c0508475be67b972b
4
- data.tar.gz: ed5d1b2cc4f493d9bf01806d57ca6b3b1e428f949b5c9b652bae9a5e9348f5ca
3
+ metadata.gz: 54844ecdb7da8a4fe22cc7635a9b7eba3a5a6ffe29a68c8f5a12f9aae0f616da
4
+ data.tar.gz: 1b4e6c2d0ae11095ae535e1248e72af66dd030c9e3bb3b7d8fbda47cb204eccb
5
5
  SHA512:
6
- metadata.gz: eff8b1b73bf954eade8ebf3ff3883cb9d4e64b9b0144331a2229cc886de71b75235697c8ea06a7379b4fa480df973e9c7cc143b58c8c6d8e979e41b7c0d98f4a
7
- data.tar.gz: a2295457e258a9de0b2061fe4ed3b86e0944a99783ea0a7da2367148a8b488a43c0b8ea174711b79720162865fcf80f8d206839bf44e29f2f061274f284bdf85
6
+ metadata.gz: 47de6e6462abad9b682b01297cf3ee76ba7b4111f41afd8c8d81baa9b3d36b5be02c548e2421150437f84cbab8644d2766e976fa836490ca37a57b6497536f18
7
+ data.tar.gz: a1c145a00972f4ed088bfc1283a2e1bd133dc59828740be0bf6a599968a914fcbf1771d25747265166b1c193e801029490d981a7baf29e0041948402f372430b
data/README.md CHANGED
@@ -8,14 +8,14 @@ with a helper in your template
8
8
  <%= futurize @posts %>
9
9
  ```
10
10
 
11
- custom `<futurism-elements>` (in the form of a `<div>` or a `<tr is="futurism-table-row">` are rendered. Those custom elements have an `IntersectionObserver` attached that will send the `dom_id` to an ActionCable channel (`FuturismChannel`) which will then replace the placeholders with the actual resource partial.
11
+ custom `<futurism-elements>` (in the form of a `<div>` or a `<tr is="futurism-table-row">` are rendered. Those custom elements have an `IntersectionObserver` attached that will send a signed global id to an ActionCable channel (`FuturismChannel`) which will then replace the placeholders with the actual resource partial.
12
12
 
13
13
  With that method, you could lazy load every class that has to_partial_path defined (ActiveModel has by default).
14
14
 
15
15
  You can pass the placeholder as a block:
16
16
 
17
17
  ```erb
18
- <%= futurize @posts do %>
18
+ <%= futurize @posts, extends: :tr do %>
19
19
  <td class="placeholder"></td>
20
20
  <% end %>
21
21
  ```
@@ -1,6 +1,6 @@
1
1
  module Futurism
2
2
  module Helpers
3
- def futurize(records, extends: :tr, &block)
3
+ def futurize(records, extends:, &block)
4
4
  placeholder = capture(&block)
5
5
  Array(records).map { |record|
6
6
  case extends
@@ -1,3 +1,3 @@
1
1
  module Futurism
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futurism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Rubisch