extjs-mvc 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/extjs/data/store.rb +3 -4
- data/lib/model/dm/model.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/lib/extjs/data/store.rb
CHANGED
@@ -10,11 +10,10 @@ module ExtJS::Data
|
|
10
10
|
options[:format] = 'json' if options[:format].nil?
|
11
11
|
|
12
12
|
@config = options[:config]
|
13
|
-
@grouping = options[:grouping] || false
|
14
13
|
@format = options[:format]
|
15
14
|
@proxy = options[:proxy] || 'http'
|
16
15
|
@writer = options[:writer]
|
17
|
-
@type = (options[:type]
|
16
|
+
@type = (options[:type].nil?) ? @proxy === 'direct' ? 'Ext.data.DirectStore' : "Ext.data.#{@format.capitalize}Store" : options[:type]
|
18
17
|
@controller = self.get_controller(options[:controller])
|
19
18
|
@model = self.get_model(options[:controller], options[:model])
|
20
19
|
|
@@ -59,9 +58,9 @@ module ExtJS::Data
|
|
59
58
|
json = @config.to_json
|
60
59
|
json[json.length-1] = ','
|
61
60
|
json += "writer:new Ext.data.#{@format.capitalize}Writer(#{@writer.to_json})}"
|
62
|
-
"<script>new
|
61
|
+
"<script>new #{@type}(#{json});#{script}</script>"
|
63
62
|
else
|
64
|
-
"<script>new
|
63
|
+
"<script>new #{@type}(#{@config.to_json});#{script}</script>"
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
data/lib/model/dm/model.rb
CHANGED
@@ -24,7 +24,7 @@ module ExtJS
|
|
24
24
|
assn = self.send(f)
|
25
25
|
data[f] = (assn) ? assn.to_record : {} # <-- a thing was requested, give emtpy thing.
|
26
26
|
elsif refl.options[:max] > 1
|
27
|
-
|
27
|
+
data[f] = self.send(f).collect {|r| r.to_record} #CAREFUL!!!!!!!!!!!!1
|
28
28
|
end
|
29
29
|
else
|
30
30
|
data[f] = self.send(f)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extjs-mvc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Scott
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-14 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|