foobara-active-record-type 0.0.6 → 0.0.7

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: c68604cfe7a45eebcd95e02929f5756dbc0c703547f6deb9c0a7adb940cb938e
4
- data.tar.gz: 507df2c192c22ce5f58514314569cfe1314c24a35a0ded7ca62f020d6a3def3a
3
+ metadata.gz: 2fb8165e3bfb7ae465f431ff850dd0532cb2fc6aca0e9fa740b9c4e565fb9435
4
+ data.tar.gz: 58e8c95928e288579b146a8fb4c211762c592ff5bcbcd724b8c366c7429d922d
5
5
  SHA512:
6
- metadata.gz: cd16b65c7084969996655dd9bd24ed93c2481c80f1c17465d0b97f7b920cd6f30b007fe07c316037d1c91ad77921d4482c89b44988822767ed77e8056eb1601a
7
- data.tar.gz: 3f9963f87e6708158528ce25cd38544c37c7274c4d6b80e866afba080748e2794859b51097d871702a0ef13d88a8c8faf2796f6fcaca1896f18dd0e4bc035993
6
+ metadata.gz: 046b7568fc5cfa44f594dfbbbcbccbc3c440cb2d823d1553a685ddb2594f27131c67fd51822570fc479138150cdb6833efce86ef22bb9ef91c4891a8002365e4
7
+ data.tar.gz: bf00cb2ec0b879d7c4fbdad793f012d460f4da31aa134ea7f6c656054269e85f797e5c7931156d3dfa9bd39c8eb1850ba50bd75e83cbbe749fffa93442066f38
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
- ## [0.0.6] - 2025-01-22
1
+ ## [0.0.7] - 2025-01-22
2
2
 
3
3
  - Make use of ModelAttributeHelpers
4
+ - Handle boolean column type
5
+ - Fix ActiveRecordThunk#== bug
4
6
 
5
7
  ## [0.0.3] - 2025-01-17
6
8
 
@@ -51,6 +51,12 @@ module Foobara
51
51
  end
52
52
  # rubocop:enable Style/TrivialAccessors
53
53
 
54
+ def ==(other)
55
+ return false unless @foobara_primary_key
56
+
57
+ other.instance_of?(@foobara_active_record_class) && @foobara_primary_key == other.id
58
+ end
59
+
54
60
  private
55
61
 
56
62
  # TODO: there are probably several other methods that don't require loading
@@ -10,7 +10,7 @@ module Foobara
10
10
  column_type = column.sql_type_metadata.type
11
11
 
12
12
  type_declaration = case column_type
13
- when :integer, :string, :datetime
13
+ when :integer, :string, :datetime, :boolean
14
14
  column_type
15
15
  else
16
16
  # :nocov:
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-22 00:00:00.000000000 Z
10
+ date: 2025-01-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord