beyond_canvas 0.18.0.pre → 0.19.0.pre
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8497d52ad577ad1bd0cdebd09e869d11ea2887a31fdc989b1bef6a17857dc2c8
|
4
|
+
data.tar.gz: cb77eecd56a81ab9bfc2f222e6899f9c689f5ede39d1b4410d7c45074dbd4e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee33312698d87e1449db902b91374a5b35f17d872f6e3c132a4bf758676f05a4574fee66fbfdf7dbce3f67b43f8dc524579dbe687307c72f8f21711770bbf93c
|
7
|
+
data.tar.gz: 2869d5f1ab74828a384dc090d745497542739729d6874b4cf8c913a01fee58be62205e08d93d1abcfcda41eba0337d97db758fe3531fb555b38758e11609af2d
|
@@ -2,10 +2,6 @@
|
|
2
2
|
|
3
3
|
module BeyondCanvas
|
4
4
|
class FormBuilder < ActionView::Helpers::FormBuilder # :nodoc:
|
5
|
-
############################################################################
|
6
|
-
# Wrappers
|
7
|
-
############################################################################
|
8
|
-
|
9
5
|
def field_wrapper(attribute, args, &block)
|
10
6
|
label = args[:label] == false ? nil : args[:label].presence || attribute.to_s.humanize
|
11
7
|
|
@@ -38,14 +34,20 @@ module BeyondCanvas
|
|
38
34
|
end
|
39
35
|
end
|
40
36
|
|
41
|
-
%i[
|
42
|
-
define_method
|
37
|
+
%i[email_field text_field number_field password_field text_area].each do |method|
|
38
|
+
define_method method do |attribute, args = {}|
|
43
39
|
field_wrapper(attribute, args) do
|
44
40
|
super(attribute, args)
|
45
41
|
end
|
46
42
|
end
|
47
43
|
end
|
48
44
|
|
45
|
+
def select(attribute, choices, options = {}, args = {})
|
46
|
+
field_wrapper(attribute, args) do
|
47
|
+
super(attribute, choices, options, args)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
49
51
|
def check_box(attribute, args = {})
|
50
52
|
inline_wrapper(attribute, args) do
|
51
53
|
filed_identifyer = filed_identifyer(attribute)
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<% path = Rails.application.routes.recognize_path(url) %>
|
18
18
|
|
19
|
-
<% options = options.merge(class: 'menu__item--active') { |_key, old_val, new_val| [new_val, old_val].join(' ') if !external_url && path[:controller] == params[:controller]
|
19
|
+
<% options = options.merge(class: 'menu__item--active') { |_key, old_val, new_val| [new_val, old_val].join(' ') } if !external_url && (path[:controller] == params[:controller]) %>
|
20
20
|
<% options = options.merge(class: 'menu__item') { |_key, old_val, new_val| [new_val, old_val].join(' ') } %>
|
21
21
|
|
22
22
|
<%= link_to name, url, options %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-10-
|
13
|
+
date: 2020-10-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: attr_encrypted
|