better_auth-rails 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c39998081e1fe16b8a01b980681d982c6acb3d2b6aaf6c748056a952372bc38c
4
- data.tar.gz: 128d2b3d19a7ae498182a2e163a3b843e90c018c2a4033aff2c18d5591cae6ab
3
+ metadata.gz: cc3d5bd26fdfd519d462f2634d4187d3a52a7334864cd2fcddf43c22b88c0975
4
+ data.tar.gz: 9b3f4ff8abd83a3264706fbb6e8406835168d781f6a247eba896f4736b4041a6
5
5
  SHA512:
6
- metadata.gz: e764e03d032c66031c7ae09e28b671e5600ae9cf1ca0a7d5304064b4aec3b8124c61fdf637dfeafbcd565c63406cdfe82e98b61c823698a96d5ba65645fdac23
7
- data.tar.gz: 2f8c7440c4a2a94145fecadda191055c7898d3063d08bb008a3ced7043587ed6ba4a6fe5bf3790552e7ca080cdfceffe7b12b53bd9f058a8a01ba7e604e60d09
6
+ metadata.gz: 78edf35b13082e9ab5ab0a964978dcf9fce608abcee9c080268a9868e1e7e9a24ce73033e36c3547e7b5eaacbbdf1573b695c95e2ac3805ce04f9048291f7e24
7
+ data.tar.gz: c9a6a504de5d9560d4223ce47a8c4f9b2b3c331b890f061bac1ae56d9ef7a9a0e30a57d4f7c683aff2a32d9869fe2dc307686aac72e453e4dd7412de070a5272
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2026-04-29
11
+
12
+ ### Fixed
13
+
14
+ - Fixed Active Record adapter value lookup so falsey values are preserved across symbol, string, and storage-key variants.
15
+ - Fixed Rails migration generation for JSON and array-like schema fields.
16
+
10
17
  ## [0.1.2] - 2026-03-22
11
18
 
12
19
  ### Fixed
@@ -286,7 +286,10 @@ module BetterAuth
286
286
  end
287
287
 
288
288
  def fetch_key(hash, key)
289
- hash[key] || hash[key.to_s] || hash[storage_key(key)] || hash[storage_key(key).to_sym]
289
+ [key, key.to_s, storage_key(key), storage_key(key).to_sym].each do |candidate|
290
+ return hash[candidate] if hash.key?(candidate)
291
+ end
292
+ nil
290
293
  end
291
294
 
292
295
  def storage_key(value)
@@ -84,6 +84,7 @@ module BetterAuth
84
84
  when "boolean" then "boolean"
85
85
  when "date" then "datetime"
86
86
  when "number" then attributes[:bigint] ? "bigint" : "integer"
87
+ when "json", "string[]", "number[]" then "json"
87
88
  else "string"
88
89
  end
89
90
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module BetterAuth
4
4
  module Rails
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_auth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Sala