plutonium 0.26.7 → 0.26.8

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: 25a972b402c936a681cd59984869f8fa9fd08e6c5ad240578bc18c95c57cac45
4
- data.tar.gz: ed73139eafd20795cb9a4be658c3f32a01c3546d51c37fd1f279eb9175697209
3
+ metadata.gz: f500aadbdb233a0f38e68d3ce8d0ae90e6a27b68a5d63a5d96265cbaf82de602
4
+ data.tar.gz: d06ee6233d99cdcb0fa02bf413ec433f9a2820e694df1016c588e420e73860ff
5
5
  SHA512:
6
- metadata.gz: c9fd52c2b932a4cc852935d03cfe3a3a3e00453d7a73aaeba698219fee78dcd354ea5a7f6443ef7c5273e401b6ad746fa50dec03ab469f178958f17231368f94
7
- data.tar.gz: 81075c91ca822c5dd4b7f8866b6b75e4f1557aae08dc70af8096ed167141e02269749f5e57b920bb0036a9cb9c8ca58fb4b0f090f923aae252b431310a7842bc
6
+ metadata.gz: 586131a1db61db7ec366d92d8f4c7bca6ccdfb17de6a022b6bb4157455a34e3f386f7c08eda31817dd6bb40bf12e2730dc45c7751df9229cfe785e40f6877406
7
+ data.tar.gz: 34b979b70fefb200982490c8f41df44dcd8f0b6804b63c4f691784ec6099a0b4c0b1446c3178512d0a57777ec9c4db8fd7031d0a15861d8f889e5d598343fa1f
@@ -1,5 +1,7 @@
1
1
  # Alias json to jsonb in SQLite migrations
2
2
  ActiveSupport.on_load(:active_record) do
3
+ next unless ActiveRecord::Base.connection.adapter_name.downcase.include?("sqlite")
4
+
3
5
  ActiveRecord::ConnectionAdapters::SQLite3::TableDefinition.class_eval do
4
6
  def jsonb(*args, **options)
5
7
  json(*args, **options)
@@ -77,15 +77,14 @@ module Plutonium
77
77
  model_class = element.class
78
78
  if model_class.respond_to?(:base_class) && model_class != model_class.base_class
79
79
  # Check if the STI model is registered, if not use base class
80
- route_configs = current_engine.routes.resource_route_config_for(model_class.to_s.pluralize.underscore)
81
- model_class = model_class.base_class if route_configs.nil? || route_configs.empty?
80
+ route_configs = current_engine.routes.resource_route_config_for(model_class.model_name.plural)
81
+ model_class = model_class.base_class if route_configs.empty?
82
82
  end
83
83
 
84
84
  controller_chain << model_class.to_s.pluralize
85
85
  if index == args.length - 1
86
- resource_route_configs = current_engine.routes.resource_route_config_for(model_class.to_s.pluralize.underscore)
87
- resource_route_config = resource_route_configs&.first
88
- url_args[:id] = element.to_param unless resource_route_config && resource_route_config[:route_type] == :resource
86
+ resource_route_config = current_engine.routes.resource_route_config_for(model_class.model_name.plural)[0]
87
+ url_args[:id] = element.to_param unless resource_route_config[:route_type] == :resource
89
88
  url_args[:action] ||= :show
90
89
  else
91
90
  url_args[model_class.to_s.underscore.singularize.to_sym] = element.to_param
@@ -47,7 +47,7 @@ module Plutonium
47
47
  action(:destroy, route_options: {method: :delete},
48
48
  record_action: true, collection_record_action: true, category: :danger,
49
49
  icon: Phlex::TablerIcons::Trash, position: 100,
50
- confirmation: "Are you sure?", turbo_frame: "_top", return_to: "")
50
+ confirmation: "Are you sure?", turbo_frame: "_top")
51
51
 
52
52
  # Example of dynamic route options using custom url_resolver:
53
53
  #
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.26.7"
2
+ VERSION = "0.26.8"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.7
4
+ version: 0.26.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-03 00:00:00.000000000 Z
11
+ date: 2025-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk