plutonium 0.44.0 → 0.44.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: 16acccd878bf0993c0c43294c93394c0856fd8927645d3eaa907bbdac543dfd7
4
- data.tar.gz: 5d02e76f411a0e3f3af074841156023015c4483a2e4287043c897b3e0560d942
3
+ metadata.gz: 39e28c885ee021fd3d43a18a3df18a3dc0b72e0d14df80752aabf07794fa3e9e
4
+ data.tar.gz: 07b0e596884dfa08ed83c7f09702a4a068dcb4442f478ac5d4a254cada100f07
5
5
  SHA512:
6
- metadata.gz: ec84fb68b2393ffdc1d46ad6eabb2cf575e53547ce67bdee97060ec2f43374db610179698b86eaf783f22ceb3c7f0c6034f69de330ebed949a45a3aaa3387cab
7
- data.tar.gz: 0aa304b4fdc503df8139987aca55b1cfd9919facd5a7aa2f33a5c9f9331ec49da8068b90e925c0571df873b31e2a7f2a5ccba0c5d96ea4544b13ad9f28632c56
6
+ metadata.gz: 7328f0c85782184f85b787c7e0c0614e03d57be0c558891da80ac96d1a0fc8371e41ec3ddf16e69c96a4f233859862454942912f1790efb62d240d7cb4a42549
7
+ data.tar.gz: 5d4344102ccedc91fc38295d3d2900b86536aa1cacebf47297e4ba469a7eb677cad092bba42daf7d74b09de7772e768380563e23dc5b1ad8633089b8698b4058
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [0.44.1] - 2026-03-30
2
+
3
+ ### 🐛 Bug Fixes
4
+
5
+ - *(railtie)* Register rescue responses before action_dispatch.configure
6
+ - *(test)* Pass association SGIDs in create params to match form submission
7
+
8
+ ### 🚜 Refactor
9
+
10
+ - *(form)* Use upstream @raw_choices from phlexi-form 0.14.2
1
11
  ## [0.44.0] - 2026-03-30
2
12
 
3
13
  ### 🚀 Features
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- plutonium (0.43.2)
4
+ plutonium (0.44.0)
5
5
  action_policy (~> 0.7.0)
6
6
  listen (~> 3.8)
7
7
  pagy (~> 43.0)
@@ -11,7 +11,7 @@ PATH
11
11
  phlex-tabler_icons
12
12
  phlexi-display (>= 0.2.0)
13
13
  phlexi-field (>= 0.2.0)
14
- phlexi-form (>= 0.14.1)
14
+ phlexi-form (>= 0.14.2)
15
15
  phlexi-menu (>= 0.4.1)
16
16
  phlexi-table (>= 0.2.0)
17
17
  rabl (~> 0.17.0)
@@ -239,7 +239,7 @@ GEM
239
239
  fiber-local
240
240
  phlex (~> 2.0)
241
241
  zeitwerk
242
- phlexi-form (0.14.1)
242
+ phlexi-form (0.14.2)
243
243
  activesupport
244
244
  phlex (~> 2.0)
245
245
  phlexi-field (~> 0.2.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- plutonium (0.43.2)
4
+ plutonium (0.44.0)
5
5
  action_policy (~> 0.7.0)
6
6
  listen (~> 3.8)
7
7
  pagy (~> 43.0)
@@ -11,7 +11,7 @@ PATH
11
11
  phlex-tabler_icons
12
12
  phlexi-display (>= 0.2.0)
13
13
  phlexi-field (>= 0.2.0)
14
- phlexi-form (>= 0.14.1)
14
+ phlexi-form (>= 0.14.2)
15
15
  phlexi-menu (>= 0.4.1)
16
16
  phlexi-table (>= 0.2.0)
17
17
  rabl (~> 0.17.0)
@@ -215,7 +215,7 @@ GEM
215
215
  fiber-local
216
216
  phlex (~> 2.0)
217
217
  zeitwerk
218
- phlexi-form (0.14.1)
218
+ phlexi-form (0.14.2)
219
219
  activesupport
220
220
  phlex (~> 2.0)
221
221
  phlexi-field (~> 0.2.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- plutonium (0.43.2)
4
+ plutonium (0.44.0)
5
5
  action_policy (~> 0.7.0)
6
6
  listen (~> 3.8)
7
7
  pagy (~> 43.0)
@@ -11,7 +11,7 @@ PATH
11
11
  phlex-tabler_icons
12
12
  phlexi-display (>= 0.2.0)
13
13
  phlexi-field (>= 0.2.0)
14
- phlexi-form (>= 0.14.1)
14
+ phlexi-form (>= 0.14.2)
15
15
  phlexi-menu (>= 0.4.1)
16
16
  phlexi-table (>= 0.2.0)
17
17
  rabl (~> 0.17.0)
@@ -217,7 +217,7 @@ GEM
217
217
  fiber-local
218
218
  phlex (~> 2.0)
219
219
  zeitwerk
220
- phlexi-form (0.14.1)
220
+ phlexi-form (0.14.2)
221
221
  activesupport
222
222
  phlex (~> 2.0)
223
223
  phlexi-field (~> 0.2.0)
@@ -23,7 +23,7 @@ module Plutonium
23
23
  Rails.application.class.include Plutonium::Engine
24
24
  end
25
25
 
26
- initializer "plutonium.rescue_responses" do |app|
26
+ initializer "plutonium.rescue_responses", before: "action_dispatch.configure" do |app|
27
27
  app.config.action_dispatch.rescue_responses["ActionPolicy::Unauthorized"] = :forbidden
28
28
  end
29
29
 
@@ -10,7 +10,7 @@ module Plutonium
10
10
 
11
11
  def choices
12
12
  @choices ||= begin
13
- collection = attributes.delete(:choices) || @association_class&.all || []
13
+ collection = @raw_choices || @association_class&.all || []
14
14
  build_choice_mapper(collection)
15
15
  end
16
16
  end
@@ -44,8 +44,8 @@ module Plutonium
44
44
 
45
45
  def choices
46
46
  @choices ||= begin
47
- collection = if (user_choices = attributes.delete(:choices))
48
- user_choices
47
+ collection = if @raw_choices
48
+ @raw_choices
49
49
  elsif @skip_authorization
50
50
  choices_from_association(association_reflection.klass)
51
51
  else
@@ -14,17 +14,12 @@ module Plutonium
14
14
 
15
15
  def choices
16
16
  @choices ||= begin
17
- Plutonium.eager_load_rails!
18
- collection = if (user_choices = attributes.delete(:choices))
19
- user_choices
20
- else
21
- associated_classes.map { |klass|
22
- [
23
- klass.model_name.human.pluralize,
24
- @skip_authorization ? choices_from_association(klass) : authorized_resource_scope(klass, relation: choices_from_association(klass))
25
- ]
26
- }.to_h
27
- end
17
+ collection = @raw_choices || associated_classes.map { |klass|
18
+ [
19
+ klass.model_name.human.pluralize,
20
+ @skip_authorization ? choices_from_association(klass) : authorized_resource_scope(klass, relation: choices_from_association(klass))
21
+ ]
22
+ }.to_h
28
23
  build_choice_mapper(collection)
29
24
  end
30
25
  end
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.44.0"
2
+ VERSION = "0.44.1"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radioactive-labs/plutonium",
3
- "version": "0.44.0",
3
+ "version": "0.44.1",
4
4
  "description": "Build production-ready Rails apps in minutes, not days. Convention-driven, fully customizable, AI-ready.",
5
5
  "type": "module",
6
6
  "main": "src/js/core.js",
data/plutonium.gemspec CHANGED
@@ -44,7 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency "phlex-rails"
45
45
  spec.add_dependency "phlex-tabler_icons"
46
46
  spec.add_dependency "phlexi-field", ">= 0.2.0"
47
- spec.add_dependency "phlexi-form", ">= 0.14.1"
47
+ spec.add_dependency "phlexi-form", ">= 0.14.2"
48
48
  spec.add_dependency "phlexi-table", ">= 0.2.0"
49
49
  spec.add_dependency "phlexi-display", ">= 0.2.0"
50
50
  spec.add_dependency "phlexi-menu", ">= 0.4.1"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.0
4
+ version: 0.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
@@ -183,14 +183,14 @@ dependencies:
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- version: 0.14.1
186
+ version: 0.14.2
187
187
  type: :runtime
188
188
  prerelease: false
189
189
  version_requirements: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: 0.14.1
193
+ version: 0.14.2
194
194
  - !ruby/object:Gem::Dependency
195
195
  name: phlexi-table
196
196
  requirement: !ruby/object:Gem::Requirement