lev 9.0.3 → 9.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lev/form_builder.rb +6 -4
- data/lib/lev/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e108883404b4ea4c1849388ce2c7e1ab36cb8f4f893134f046c91b3204c9d49
|
4
|
+
data.tar.gz: f41450431f042f8ef0f4914847a20e23326573da2beea73d480aa0fa9b07698a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8965e8dc1d07753fb4d28178f878cd3269108d1605daa61d23051b57e740a6f617635076d1710efc4aff81db9aabf71354b653ec763842a337f068581b2361ed
|
7
|
+
data.tar.gz: 93d5ae3f2ed78280248cebd8a54f7a14b3d4405c85e5c7f983f8145f0866fe11c235f55e8903c5f64d6d89adb6a555ff1419fa64f7fd4a95937341a82f26334e
|
data/lib/lev/form_builder.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
module Lev
|
2
2
|
class FormBuilder < ActionView::Helpers::FormBuilder
|
3
3
|
|
4
|
-
(
|
4
|
+
(
|
5
|
+
field_helpers.map(&:to_s) - %w(label check_box radio_button fields_for file_field)
|
6
|
+
).each do |selector|
|
5
7
|
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
|
6
8
|
def #{selector}(method, options = {}) # def text_field(method, options = {})
|
7
9
|
set_value_if_available(method, options) # ... verbatim ...
|
@@ -26,11 +28,11 @@ module Lev
|
|
26
28
|
def fields_for(record_name, record_object = nil, fields_options = {}, &block)
|
27
29
|
raise "Didn't put fields_for into LevitateFormBuilder yet"
|
28
30
|
end
|
29
|
-
|
31
|
+
|
30
32
|
protected
|
31
33
|
|
32
34
|
def get_form_params_entry(name)
|
33
|
-
@options[:params].present? ?
|
35
|
+
@options[:params].present? ?
|
34
36
|
(@options[:params][@object_name].present? ?
|
35
37
|
@options[:params][@object_name][name] :
|
36
38
|
nil) :
|
@@ -60,4 +62,4 @@ def lev_form_for(record_or_name_or_array, *args, &proc)
|
|
60
62
|
options[:params] = params
|
61
63
|
options[:errors] = handler_errors # @errors || (@handler_outcome ? @handler_outcome.errors : [])
|
62
64
|
form_for(record_or_name_or_array, *(args << options.merge(:builder => Lev::FormBuilder)), &proc)
|
63
|
-
end
|
65
|
+
end
|
data/lib/lev/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|