eac_rails_utils 0.22.1 → 0.22.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a88b255d31abb1059b16e75e33cb24b9ba2ad64a3d35afd63e27bc1d01dbbbe
4
- data.tar.gz: b50b1587013cb361fe0eb2d7d56ee46dd5bdd87ed6aacf836aee7867ec7c152e
3
+ metadata.gz: '096e1328b734ccfab79690e9ca698890b50c24edb64eed9031e703a9ebe73a23'
4
+ data.tar.gz: a50b9109efb4f930a112c72c6681fef83539433d469adb4acea25fde231790ca
5
5
  SHA512:
6
- metadata.gz: 1249f9ba2a9598117e86de27b315fdd2f6f0f55330ee39916ea9e03f25c97b9c966a99a476628a1dfda677ea14b518cdf7478ad21eafc41868b4bcf4222fe65e
7
- data.tar.gz: a7def8aa5c32a906ecae3e29b5c42ba669f962c368ad3ae01153de142ce74cc3f3da22f9090cc4d9d97fa359080ed414985be9879b8d3f42ec476e7b6f0dcae9
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 = {}, &extension) # rubocop:disable Naming/PredicateName
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsUtils
4
- VERSION = '0.22.1'
4
+ VERSION = '0.22.2'
5
5
  end
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.1
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-09 00:00:00.000000000 Z
11
+ date: 2023-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-sass