eac_rails_utils 0.22.1 → 0.22.2
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: '096e1328b734ccfab79690e9ca698890b50c24edb64eed9031e703a9ebe73a23'
|
4
|
+
data.tar.gz: a50b9109efb4f930a112c72c6681fef83539433d469adb4acea25fde231790ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d94028a4405b995ccd494f1654ec0fe89183c7984fc135957b6b96c50701926250d0c9f04a062c7704b2fac49191a1e72d2bf468ddc0fcbc063cf717bd274cd
|
7
|
+
data.tar.gz: 3607deb9c25681a9c33bc4160c88d1d139995a676d59362d0066fed68465d1dd70d3a171581406291fbad6764210274fd78bb5cdf981ab5c1785b7b26b730bfa
|
@@ -24,14 +24,14 @@ module EacRailsUtils
|
|
24
24
|
|
25
25
|
module ClassMethods
|
26
26
|
# define association like ActiveRecord
|
27
|
-
def belongs_to(name, scope = nil, options
|
27
|
+
def belongs_to(name, scope = nil, **options)
|
28
28
|
reflection = ActiveRecord::Associations::Builder::BelongsTo
|
29
29
|
.build(self, name, scope, options)
|
30
30
|
ActiveRecord::Reflection.add_reflection self, name, reflection
|
31
31
|
end
|
32
32
|
|
33
33
|
# define association like ActiveRecord
|
34
|
-
def has_many(name, scope = nil, options
|
34
|
+
def has_many(name, scope = nil, **options, &extension) # rubocop:disable Naming/PredicateName
|
35
35
|
options.reverse_merge!(active_model: true, target_ids: "#{name.to_s.singularize}_ids")
|
36
36
|
if scope.is_a?(Hash)
|
37
37
|
options.merge!(scope)
|
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.22.
|
4
|
+
version: 0.22.2
|
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: 2023-10-
|
11
|
+
date: 2023-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-sass
|