enum_errors_away 0.4.0 → 0.5.0
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/enum_errors_away/active_record_extension.rb +4 -2
- data/lib/enum_errors_away/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4bac7b769e6b6d6aeb286b30984f2dac7beec851398af2d42c56d7e3d0713732
|
|
4
|
+
data.tar.gz: 16a6cdfc2c12c90036c06e13211f52bafdb2affb118dc0290bea1f4b97e9450f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e26fbee663d16d10a873f113500ea350c0e7e2eeae9617061a95b0328beb5681e22b4a0b43bc38dc892b4b725e93d0c85d6b32e5f9cbd64e82d64ae96a14329
|
|
7
|
+
data.tar.gz: c35c6f3b21e959825493b99f5046f0520c4c5d70e987382f7857388389c175dbd2a060b07a2c086a5fce26b8d54949153f9155fb8e76d348fb7837d251bd3cfc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0] - 2026-04-01
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Handle PostgreSQL native enum columns correctly. When a column has `type: :enum` (created with `t.enum` in migrations), the gem now declares an attribute for it. Previously, the gem skipped all existing columns, but Rails 8 requires explicit attribute declarations for PostgreSQL native enum columns. (Fixes #1)
|
|
8
|
+
|
|
3
9
|
## [0.4.0] - 2025-12-05
|
|
4
10
|
|
|
5
11
|
Change the way we define the fallback.
|
|
@@ -34,8 +34,10 @@ module EnumErrorsAway
|
|
|
34
34
|
|
|
35
35
|
begin
|
|
36
36
|
enum_name_str = enum_name.to_s
|
|
37
|
-
# Only declare attribute if there's no column for it
|
|
38
|
-
|
|
37
|
+
# Only declare attribute if there's no column for it,
|
|
38
|
+
# OR if the column is a PostgreSQL native enum (type :enum)
|
|
39
|
+
column = columns_hash[enum_name_str]
|
|
40
|
+
next if column && column.type != :enum
|
|
39
41
|
|
|
40
42
|
# Determine attribute type from enum values:
|
|
41
43
|
# - If all values are integers (or array), use :integer
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: enum_errors_away
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sampo Kuokkanen
|
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
145
|
- !ruby/object:Gem::Version
|
|
146
146
|
version: '0'
|
|
147
147
|
requirements: []
|
|
148
|
-
rubygems_version: 3.
|
|
148
|
+
rubygems_version: 3.6.9
|
|
149
149
|
specification_version: 4
|
|
150
150
|
summary: Fix Rails 7.2+ enum migration failures
|
|
151
151
|
test_files: []
|