svelte-on-rails 6.0.0 → 6.0.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 +4 -4
- data/README.md +1 -1
- data/lib/svelte_on_rails/lib/to_svelte.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a07c9c33f2ef2d71acbd9986cc841fada803a3692abec84719648e9d5d94c79
|
4
|
+
data.tar.gz: 8677455b7ef6137269451b12f9ed8350ff7ba842198f89e2864f7e6c5615a20e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a97fd9a881d5fa6b32f4faacf87ded1210939984e01274b4fb334b6f5444624ede7dac476e8fa2daa83f960d2f34ecacdc49cbebb4d0ed548c05f5425900622
|
7
|
+
data.tar.gz: 1caab439e622e43009cbc1ff2ee193fa35e0bbc0b63128ca0c917787536a01d3e92910f52e110fcec38d17533e6e7c7415d05ce87970d07fd9f45287801c8355
|
data/README.md
CHANGED
@@ -334,7 +334,7 @@ would result in something like this:
|
|
334
334
|
]
|
335
335
|
},
|
336
336
|
"book_labels" => {
|
337
|
-
"name" => "Name", # translated by human_attribute_name
|
337
|
+
"name" => "Name", # translated by human_attribute_name
|
338
338
|
"calculation_method" => "Calculation method",
|
339
339
|
"author" => "Author"
|
340
340
|
},
|
@@ -47,6 +47,7 @@ module SvelteOnRails
|
|
47
47
|
# we have associations
|
48
48
|
attr.each do |key, value|
|
49
49
|
next if ['offset', 'limit'].include?(key.to_s)
|
50
|
+
raise "[svelte-on-rails:to_svelte] #{record.class} does not respond to: #{key}" unless record.respond_to?(key)
|
50
51
|
_offset, _limit, _value = extract_limit(value)
|
51
52
|
|
52
53
|
_key = key.to_s
|
@@ -82,6 +83,7 @@ module SvelteOnRails
|
|
82
83
|
else
|
83
84
|
# we have attributes
|
84
85
|
raise 'Invalid attribute' unless [Symbol, String].include?(attr.class)
|
86
|
+
raise "[svelte-on-rails:to_svelte] #{record.class} does not respond to: #{attr}" unless record.respond_to?(attr)
|
85
87
|
_key = attr.to_s
|
86
88
|
|
87
89
|
values[_key] = record.send(_key)
|