phlex-rails 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d500a3ff8d27e51acd27c6901159a5878ee3bf86548d621e4d3deae2d04ad18
4
- data.tar.gz: 076fce2ab65191941c6f5f7e72e861e9f0c8768909051977c840661b76811d90
3
+ metadata.gz: 64bd1c0569d8a687689b1eec091acff484e3c3c7db388f80ddc1cb059881c680
4
+ data.tar.gz: 282af2d851aaef5e1266519b59ba5ade1360cd13666d629b4109441f16abb6f6
5
5
  SHA512:
6
- metadata.gz: a48694a35ddc236320b5467548cf5a509a8cd6cb069277aa39109be4e49f6d299459b14a2c8d8afa3debc559deecdec90743536fbad42b2e2ba4250aadcb7d92
7
- data.tar.gz: 3dbd6856b20b5c27471cded9cb6600da3d71de126134564b9367eafa88bdbf3c9e18463c442892d63d58ac118a3c39d91959dd52be6b8aba373071cc4b7d75fb
6
+ metadata.gz: e9f65f079a1ec7372692767beb7f7f1f70dac50f4429f429aa0085bbfefcd40675e2933985d728ed2354fb90983d86a707d1f5432c3333f72f843032086c7924
7
+ data.tar.gz: 7e5f5fe2316c5db3ae8757a67517856ffdebf4f5b03467d17a712eb6c571486f402ceeb993cd1ceba31c3a7cfef37aa104ed297123be43fb30cb2af790775530
@@ -12,12 +12,16 @@ module Phlex
12
12
  end
13
13
  end
14
14
 
15
- def render(renderable = nil, *args, **kwargs, &block)
16
- return super if renderable.is_a?(Phlex::SGML)
17
- return super if renderable.is_a?(Class) && renderable < Phlex::SGML
15
+ def render(*args, **kwargs, &block)
16
+ renderable = args[0]
18
17
 
19
- if renderable
20
- @_context.target << @_view_context.render(renderable, *args, **kwargs, &block)
18
+ case renderable
19
+ when Phlex::SGML, Proc
20
+ return super
21
+ when Class
22
+ return super if renderable < Phlex::SGML
23
+ when Enumerable
24
+ return super unless renderable.is_a?(ActiveRecord::Relation)
21
25
  else
22
26
  @_context.target << @_view_context.render(*args, **kwargs, &block)
23
27
  end
@@ -8,11 +8,7 @@ module Phlex::Rails::UnbufferedOverrides
8
8
  @object.capture do
9
9
  if b
10
10
  @object.public_send(name, *a, **k) do |*aa|
11
- if aa.length == 1 && aa[0].is_a?(Phlex::SGML)
12
- @object.helpers.capture(aa[0].unbuffered, &b)
13
- else
14
- @object.helpers.capture(*aa, &b)
15
- end
11
+ @object.helpers.capture(*aa, &b)
16
12
  end
17
13
  else
18
14
  @object.public_send(name, *a, **k)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlex
4
4
  module Rails
5
- VERSION = "0.8.1"
5
+ VERSION = "0.9.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Drapper
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-09 00:00:00.000000000 Z
11
+ date: 2023-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex