foobara-active-record-type 0.0.10 → 0.0.11

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: 1a325eb468219f2eb1f4033930b08a6c02cf15363a87fe4194bfbe3bec9098c1
4
- data.tar.gz: 9a19c1c2e8035274d0db2764c397ff3917f284dab9f3f5badc6b6a5e9dd7dbe9
3
+ metadata.gz: 0f7d5092a44023063818776cd29a0cacb950adc6a4299959b8de173e8a2bd8af
4
+ data.tar.gz: e44239f4fecaf4a20abe8d642c53100f32d9a420441fbd30642278f3a5b84c05
5
5
  SHA512:
6
- metadata.gz: 427fd034fd661cee2f79b6278b9d95a6174a367e818b307735bbedaaa03d5517b7f28e2b3078987bbc47b704b83153333ce607d9866deb9ecacbd2714c9fe6a1
7
- data.tar.gz: 3e59d009474d55909f040a4ee2fbb2b6142b9c50cb1d5f15c6a8e2be282b05da7606be341b8731541c87e8316b8819f6a12b76def43baef8b1fe21de2a365149
6
+ metadata.gz: ff9efed87c28bfbe8a559827066d98260994e55bb8566795c84190b60f09420fd5444d070b8dd4c4bdb14b2e8ae7aa1ade09a0f3b1696dc1694ac8085a42ef49
7
+ data.tar.gz: 6a91b088e7fe7f6f91a32914ed74fdcbf671431fa722de22cfb8cbd70ae69aec04b70be8194a952be270963fc0f72e23bcb3aa8a1bb6feb5f5c46c298c048e6c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [0.0.11] - 2025-01-30
2
+
3
+ - Add some missing methods to ActiveRecord::Base
4
+ - Fix bug where primary key is a string instead of a symbol
5
+
1
6
  ## [0.0.10] - 2025-01-29
2
7
 
3
8
  - Fix bug causing duplication of domain name in type name
@@ -22,6 +22,8 @@ module Foobara
22
22
 
23
23
  ActiveRecord::Base.include ModelAttributeHelpers::Concerns::AttributeHelpers
24
24
  ActiveRecord::Base.include ActiveRecordFoobaraMethods
25
+ ActiveRecord::Base.include Foobara::DetachedEntity::Concerns::Reflection
26
+ ActiveRecord::Base.include Foobara::Model::Concerns::Reflection
25
27
 
26
28
  if defined?(Foobara::CommandConnectors::RailsCommandConnector)
27
29
  Foobara::CommandConnectors::RailsCommandConnector.default_serializers = [
@@ -11,8 +11,20 @@ module Foobara
11
11
  {}
12
12
  end
13
13
 
14
+ # TODO: implement this or figure out how to re-use the methods from Entity/Model
15
+ def foobara_deep_associations
16
+ # TODO: test this
17
+ # :nocov:
18
+ {}
19
+ # :nocov:
20
+ end
21
+
22
+ def foobara_model_name
23
+ foobara_type&.scoped_name || Util.non_full_name(self)
24
+ end
25
+
14
26
  def foobara_primary_key_attribute
15
- primary_key
27
+ primary_key&.to_sym
16
28
  end
17
29
 
18
30
  def foobara_primary_key_type
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-active-record-type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-01-30 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.6.2
93
+ rubygems_version: 3.6.3
94
94
  specification_version: 4
95
95
  summary: Provides a detached entity foobara type for Active Record classes
96
96
  test_files: []