dynamic_scaffold 1.10.0 → 1.11.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: d2878d75af1c0e57b392261a63012a7e8adaf8b527cc6da8bb7c8ea5f84011a5
4
- data.tar.gz: 5a0037e29736c6863901d7f7fdbec3aaeefd0a1ebb746d21f49c3356838cfcf5
3
+ metadata.gz: fa5ec9c069fde80c1ee44d34bafe454d67c1b8e9ad291175b65f2174d4fedd73
4
+ data.tar.gz: d23f8d2d63c3657288a1c1ac1b76fd81c68720b60e8d22d0ba986d52b1f4b610
5
5
  SHA512:
6
- metadata.gz: 9ef5af49b21cd93f46e1e13138eff64823fe3e5379882bdf0910e8082ecba8d7f9b65dd8c8b6cde8c22fb0fbb7fe5f92ffc1c31e61bfd7fd18a22fbdd8756022
7
- data.tar.gz: bb3b7662d02ebda9658ada08ce216e63ac24f4c63d2434757cc924c6e56ae8ab4b3156809b062824b7251d14037791fa00189eeace66498f53117b7fb8d8b44c
6
+ metadata.gz: cdc7b66a1db5b926895223a02a37fe69db8a4d1dd0f765f80419fe2b185956d9b8f519180baaa4f7fce692840ac754d03557c58853f8333d374adc582cc71115
7
+ data.tar.gz: a915af903ec7fa690bb03922146306f30664547e2644ad806b846107008495b20f0b6a2142fcd5fa413f28a3678e39f4a90b3c94a83c2da92aaa9c8cede871c6
@@ -1,4 +1,4 @@
1
- <% if elem.needs_rendering?(self)%>
1
+ <% if elem.needs_rendering?(self, form.object)%>
2
2
  <% if !elem.label? && elem.type?(:hidden_field) %>
3
3
  <%= elem.render(self, form) %>
4
4
  <% else %>
@@ -124,10 +124,10 @@ module DynamicScaffold
124
124
  self
125
125
  end
126
126
 
127
- def needs_rendering?(view)
127
+ def needs_rendering?(view, record)
128
128
  return true unless @if_block || @unless_block
129
- return view.instance_exec(view.controller.params, &@if_block) if @if_block
130
- return !view.instance_exec(view.controller.params, &@unless_block) if @unless_block
129
+ return view.instance_exec(view.controller.params, record, &@if_block) if @if_block
130
+ return !view.instance_exec(view.controller.params, record, &@unless_block) if @unless_block
131
131
  end
132
132
 
133
133
  def proxy(attribute_name)
@@ -1,3 +1,3 @@
1
1
  module DynamicScaffold
2
- VERSION = '1.10.0'.freeze
2
+ VERSION = '1.11.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masamoto Miyata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-20 00:00:00.000000000 Z
11
+ date: 2021-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: classnames-rails-view