extjs-mvc 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/active_record/model.rb +2 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.33
|
data/lib/active_record/model.rb
CHANGED
@@ -18,7 +18,8 @@ module ExtJS
|
|
18
18
|
self.class.extjs_record_fields.each do |f|
|
19
19
|
if refl = self.class.reflections[f]
|
20
20
|
if refl.macro === :belongs_to
|
21
|
-
|
21
|
+
assn = self.send(f)
|
22
|
+
data[f] = (assn) ? assn.to_record : {} # <-- a thing was requested, give emtpy thing.
|
22
23
|
elsif refl.macro === :has_many
|
23
24
|
#data[f] = self.send(f).collect {|r| r.to_record} CAREFUL!!!!!!!!!!!!1
|
24
25
|
end
|