asbru 0.0.12 → 0.0.15
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 +4 -4
- data/lib/asbru/form_builder.rb +12 -3
- data/lib/asbru/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ebf12b69b01b62d6dcbc52649220873833aee8f9f9e5fa02d7ebfc568612b3ca
|
|
4
|
+
data.tar.gz: dfb5e1c9e02f4943c2f6e8a187c00b105756b08e64e60531a35307907618b227
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36e7a3e6eb29ed8978569190fc086cafd983ced9e3669c77f8e1b4b4d3e9470f9634441bea50f8112cf37b050d9cf3054e47210dcd4ddf41a7d5ff6d4fecace1
|
|
7
|
+
data.tar.gz: 682f6f031a738b95d31083d27ba11669b8dfdb161697d71bd67c14c5497d132d6d32724f43039c2213a01f395edc6d2e5d4058299f459e888b4198dbf1726f87
|
data/lib/asbru/form_builder.rb
CHANGED
|
@@ -93,13 +93,20 @@ module Asbru
|
|
|
93
93
|
collection,
|
|
94
94
|
value_method,
|
|
95
95
|
text_method,
|
|
96
|
-
|
|
96
|
+
options,
|
|
97
97
|
multiple = false)
|
|
98
98
|
collection.map do |item|
|
|
99
99
|
{
|
|
100
|
-
label:
|
|
100
|
+
label: if options[:translate_options]
|
|
101
|
+
I18n.t(
|
|
102
|
+
item.send(text_method),
|
|
103
|
+
scope: "activerecord.attributes.#{@object.class.name.downcase}.#{attribute}_options"
|
|
104
|
+
)
|
|
105
|
+
else
|
|
106
|
+
item.send(text_method)
|
|
107
|
+
end,
|
|
101
108
|
value: item.send(value_method),
|
|
102
|
-
name: tag_name_for(attribute, multiple),
|
|
109
|
+
name: options[:name] || tag_name_for(attribute, multiple),
|
|
103
110
|
checked: if @object.nil?
|
|
104
111
|
false
|
|
105
112
|
else
|
|
@@ -164,8 +171,10 @@ module Asbru
|
|
|
164
171
|
errors: errors(attribute),
|
|
165
172
|
errorIcon: error_icon,
|
|
166
173
|
type: 'file',
|
|
174
|
+
attachmentDeletionKey: tag_name_for("_delete_#{attribute}"),
|
|
167
175
|
**options
|
|
168
176
|
}
|
|
177
|
+
|
|
169
178
|
if @object.present? && attribute.present?
|
|
170
179
|
options[:label] ||= I18n.t(attribute,
|
|
171
180
|
scope: "activerecord.attributes.#{@object.class.name.downcase}")
|
data/lib/asbru/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asbru
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stev-0
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
109
|
version: '0'
|
|
110
110
|
requirements: []
|
|
111
|
-
rubygems_version: 3.
|
|
111
|
+
rubygems_version: 3.3.7
|
|
112
112
|
signing_key:
|
|
113
113
|
specification_version: 4
|
|
114
114
|
summary: Asbru is a tool for creating component based webpages.
|