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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f500aadbdb233a0f38e68d3ce8d0ae90e6a27b68a5d63a5d96265cbaf82de602
|
4
|
+
data.tar.gz: d06ee6233d99cdcb0fa02bf413ec433f9a2820e694df1016c588e420e73860ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
81
|
-
model_class = model_class.base_class if route_configs.
|
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
|
-
|
87
|
-
|
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"
|
50
|
+
confirmation: "Are you sure?", turbo_frame: "_top")
|
51
51
|
|
52
52
|
# Example of dynamic route options using custom url_resolver:
|
53
53
|
#
|
data/lib/plutonium/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2025-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|