svelte-on-rails 23.2.1 → 23.2.3
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: f57193866eadaa502f7c7a58092f5b3eef61e5daaf61afa6ddaad40654aea5c5
|
|
4
|
+
data.tar.gz: 4e8e65401809985e091f63e6477cd263caf7bee5cc1bf8e9091c028c7174a907
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 477588c626391c9a253c262959f15f612a21a19f0a54b300dd0bdc8e5f110f947351274dd6b214b18adcee0973288e25072d1c1e991efbfd39b40e09b6cac432
|
|
7
|
+
data.tar.gz: 17224735040f888256f2de5c8043eb0ac12d5218e38d4f4f4c7b8e906ec5dfdbe9f1dfdea2c3b7d687c7509393e8052f2bbc2768a47a696a167b0cb3a49feb0d
|
|
@@ -57,8 +57,12 @@ module SvelteOnRails
|
|
|
57
57
|
_attrs, _assoc = SvelteOnRails::Lib::ToSvelteSupport.separate_associations(attrs)
|
|
58
58
|
|
|
59
59
|
cl = model.reflect_on_association(k)
|
|
60
|
-
raise "
|
|
61
|
-
|
|
60
|
+
raise "[SOR] Association or method «#{k}» not found in model «#{model}»" unless cl || model.method_defined?(k)
|
|
61
|
+
|
|
62
|
+
if !cl # we have a method
|
|
63
|
+
@labels["_#{k}_schema"] ||= {}
|
|
64
|
+
@labels["_#{k}_schema"]['method'] = 'true'
|
|
65
|
+
elsif klass_missing?(cl) && cl.polymorphic?
|
|
62
66
|
@labels["_#{cl.name}_schema"] ||= {}
|
|
63
67
|
@labels["_#{cl.name}_schema"]['polymorphic'] = 'true'
|
|
64
68
|
else
|
|
@@ -79,6 +83,7 @@ module SvelteOnRails
|
|
|
79
83
|
'human_name_plural' => model_name_plural(model),
|
|
80
84
|
'param_key' => mn.param_key,
|
|
81
85
|
'route_key' => mn.route_key,
|
|
86
|
+
'model_name' => mn.name,
|
|
82
87
|
}
|
|
83
88
|
end
|
|
84
89
|
|
|
@@ -74,7 +74,7 @@ module SvelteOnRails
|
|
|
74
74
|
next if %w[offset limit].include?(key_s)
|
|
75
75
|
|
|
76
76
|
reflection = record.class.reflect_on_association(key_s)
|
|
77
|
-
raise ArgumentError, "No association #{key_s.inspect} on #{record.class}" unless reflection
|
|
77
|
+
raise ArgumentError, "No association or method #{key_s.inspect} on #{record.class}" unless reflection || record.class.method_defined?(key_s)
|
|
78
78
|
|
|
79
79
|
related = record.send(key_s)
|
|
80
80
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: svelte-on-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 23.2.
|
|
4
|
+
version: 23.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christian Sedlmair
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-11-03 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: railties
|
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
157
|
version: '0'
|
|
158
158
|
requirements: []
|
|
159
|
-
rubygems_version:
|
|
159
|
+
rubygems_version: 3.6.2
|
|
160
160
|
specification_version: 4
|
|
161
161
|
summary: Server-side rendering, caching, built on vite_rails.
|
|
162
162
|
test_files: []
|