eac_rails_utils 0.28.0 → 0.28.1
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/app/helpers/eac_rails_utils/common_form_helper/form_builder/association_select_field.rb +4 -4
- data/app/helpers/eac_rails_utils/data_table_helper/data_table/value_cell.rb +1 -1
- data/app/helpers/eac_rails_utils/data_table_helper.rb +2 -2
- data/lib/eac_rails_utils/menus/action.rb +1 -1
- data/lib/eac_rails_utils/models/tableless_associations.rb +2 -2
- data/lib/eac_rails_utils/version.rb +1 -1
- metadata +18 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ec8b109e0c6e66d5becb0aef1acf93b5fb5c44064585cbfe84fc582265da3c42
|
|
4
|
+
data.tar.gz: 7db6bbecd1c9e8af9f93f91e547fd8966d2a5d6c1fc553131d690ee9e753ddad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f09bfc73b3c3754897bdc3b380cb80249ebd91d9300d05c4ba61a047b16f13b9f0c8f62268a15c67f365ee6982c7cca635b956bcd2d226bb6ca32dc8b9d0bbce
|
|
7
|
+
data.tar.gz: 2e4f6018993f20cd2a698ec1185cf7a8add3e09a84c76a25ad0263fa0f6df4c53afb0e57eb1f7a00655ee0f500874f60bf75a6064e70106729be7b76c48e1810
|
data/app/helpers/eac_rails_utils/common_form_helper/form_builder/association_select_field.rb
CHANGED
|
@@ -12,14 +12,14 @@ module EacRailsUtils
|
|
|
12
12
|
|
|
13
13
|
def collection
|
|
14
14
|
extract_association_key(:collection, *(
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
::Rails.version < '5' ? [:all] : %i[klass all]
|
|
16
|
+
))
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def foreign_key
|
|
20
20
|
extract_association_key(:foreign_key, (
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
::Rails.version < '5' ? :association_foreign_key : :join_foreign_key
|
|
22
|
+
))
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def methods
|
|
@@ -20,7 +20,7 @@ module EacRailsUtils
|
|
|
20
20
|
|
|
21
21
|
# @return [Hash]
|
|
22
22
|
def tag_attributes
|
|
23
|
-
column.value_cell_attributes.map { |k, v| [k, tag_attribute_value(v)] }.to_h # rubocop:disable Style/
|
|
23
|
+
column.value_cell_attributes.map { |k, v| [k, tag_attribute_value(v)] }.to_h # rubocop:disable Style/MapToHash
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module EacRailsUtils
|
|
4
4
|
module DataTableHelper
|
|
5
|
-
def data_table(dataset, &
|
|
6
|
-
::EacRailsUtils::DataTableHelper::DataTable.new(self, dataset, &
|
|
5
|
+
def data_table(dataset, &)
|
|
6
|
+
::EacRailsUtils::DataTableHelper::DataTable.new(self, dataset, &).output
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
end
|
|
@@ -25,7 +25,7 @@ module EacRailsUtils
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# define association like ActiveRecord
|
|
28
|
-
def has_many(name, scope = nil, **options, &
|
|
28
|
+
def has_many(name, scope = nil, **options, &) # rubocop:disable Metrics/MethodLength, Naming/PredicatePrefix
|
|
29
29
|
options.reverse_merge!(active_model: true, target_ids: "#{name.to_s.singularize}_ids")
|
|
30
30
|
if scope.is_a?(Hash)
|
|
31
31
|
options.merge!(scope)
|
|
@@ -33,7 +33,7 @@ module EacRailsUtils
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
reflection = EacRailsUtils::Models::TablelessAssociations::HasManyForActiveModel
|
|
36
|
-
.build(self, name, scope, options, &
|
|
36
|
+
.build(self, name, scope, options, &)
|
|
37
37
|
ActiveRecord::Reflection.add_reflection self, name, reflection
|
|
38
38
|
|
|
39
39
|
mixin = generated_association_methods
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eac_rails_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.28.
|
|
4
|
+
version: 0.28.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- E.A.C.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootstrap-sass
|
|
@@ -36,21 +36,24 @@ dependencies:
|
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '0.
|
|
39
|
+
version: '0.131'
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: 0.131.1
|
|
40
43
|
type: :runtime
|
|
41
44
|
prerelease: false
|
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
46
|
requirements:
|
|
44
47
|
- - "~>"
|
|
45
48
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '0.
|
|
49
|
+
version: '0.131'
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: 0.131.1
|
|
47
53
|
- !ruby/object:Gem::Dependency
|
|
48
|
-
name:
|
|
54
|
+
name: rails
|
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
|
50
56
|
requirements:
|
|
51
|
-
- - "~>"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: 6.1.7
|
|
54
57
|
- - ">="
|
|
55
58
|
- !ruby/object:Gem::Version
|
|
56
59
|
version: 6.1.7.10
|
|
@@ -58,9 +61,6 @@ dependencies:
|
|
|
58
61
|
prerelease: false
|
|
59
62
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
63
|
requirements:
|
|
61
|
-
- - "~>"
|
|
62
|
-
- !ruby/object:Gem::Version
|
|
63
|
-
version: 6.1.7
|
|
64
64
|
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
66
|
version: 6.1.7.10
|
|
@@ -105,6 +105,9 @@ dependencies:
|
|
|
105
105
|
- - "~>"
|
|
106
106
|
- !ruby/object:Gem::Version
|
|
107
107
|
version: '0.12'
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 0.12.2
|
|
108
111
|
type: :development
|
|
109
112
|
prerelease: false
|
|
110
113
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -112,6 +115,9 @@ dependencies:
|
|
|
112
115
|
- - "~>"
|
|
113
116
|
- !ruby/object:Gem::Version
|
|
114
117
|
version: '0.12'
|
|
118
|
+
- - ">="
|
|
119
|
+
- !ruby/object:Gem::Version
|
|
120
|
+
version: 0.12.2
|
|
115
121
|
description:
|
|
116
122
|
email:
|
|
117
123
|
executables: []
|
|
@@ -216,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
216
222
|
requirements:
|
|
217
223
|
- - ">="
|
|
218
224
|
- !ruby/object:Gem::Version
|
|
219
|
-
version: '2
|
|
225
|
+
version: '3.2'
|
|
220
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
227
|
requirements:
|
|
222
228
|
- - ">="
|