volt 0.8.10 → 0.8.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -2
- data/VERSION +1 -1
- data/lib/volt/models/persistors/array_store.rb +6 -3
- data/lib/volt/models/persistors/query/query_listener.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfab192f992f08976f93097a2281b3f25e1a74ca
|
4
|
+
data.tar.gz: 81803fb1527d18adee2e69aecdb5f76d3003eaa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11b9c3402d259b166876db5160b2fdacb59d12a8386b55f1d0718e04a6f0783996ef3d7a7e575cbc184c71e06ee4275937c3d93c3c8670f7056897ebb301af6d
|
7
|
+
data.tar.gz: baef058f15caba26ca1c7f322a02ce66685ea6eabf3b823bb551001eafefd0a054548885e4b19f7d1e964900a85ed22e6c097e85c734e9f4cb8cb18da8952d49
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# 0.8.10
|
2
2
|
- url.query, url.fragment, url.path all update reactively now.
|
3
3
|
- MAJOR CHANGE: Previously all tables and fields were created with _'s as their name prefixes. The underscores have been removed from everywhere. The only place you use underscores is when you want to access fields without creating setters and getters. Now when you do: ```model._name = 'Something'```, your setting the ```name``` attribute on the model. When you do: ```model._name```, your fetching the ```name``` attribute. If you insert a hash into a collection, you no longer use underscores:
|
4
4
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
store._items << {name: 'Item 1'}
|
7
7
|
```
|
8
8
|
|
9
|
-
|
9
|
+
Continue using underscores in routes.
|
10
10
|
|
11
11
|
|
12
12
|
# 0.8.6 - Oct 5, 2014
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.11
|
@@ -61,11 +61,12 @@ module Persistors
|
|
61
61
|
|
62
62
|
if @query.is_a?(Proc)
|
63
63
|
@query_computation = -> do
|
64
|
-
puts "Run Query Again"
|
65
64
|
stop_listening(false)
|
66
65
|
|
67
66
|
change_state_to :loading
|
68
67
|
|
68
|
+
new_query = @query.call
|
69
|
+
|
69
70
|
run_query(@model, @query.call)
|
70
71
|
end.watch!
|
71
72
|
else
|
@@ -142,10 +143,12 @@ module Persistors
|
|
142
143
|
def add(index, data)
|
143
144
|
$loading_models = true
|
144
145
|
|
146
|
+
data_id = data[:_id]
|
147
|
+
|
145
148
|
# Don't add if the model is already in the ArrayModel
|
146
|
-
if !@model.array.find {|v| v._id ==
|
149
|
+
if !@model.array.find {|v| v._id == data_id }
|
147
150
|
# Find the existing model, or create one
|
148
|
-
new_model = @@identity_map.find(
|
151
|
+
new_model = @@identity_map.find(data_id) do
|
149
152
|
new_options = @model.options.merge(path: @model.path + [:[]], parent: @model)
|
150
153
|
@model.new_model(data, new_options, :loaded)
|
151
154
|
end
|
@@ -42,7 +42,7 @@ class QueryListener
|
|
42
42
|
# copy the data from the existing model.
|
43
43
|
store.model.clear
|
44
44
|
@stores.first.model.each_with_index do |item, index|
|
45
|
-
store.add(index, item)
|
45
|
+
store.add(index, item.to_h)
|
46
46
|
end
|
47
47
|
else
|
48
48
|
# First time we've added a store, setup the listener and get
|