Skip to content

Commit 04275b8

Browse files
committed
Merge pull request #77 from wndhydrnt/master
Access models from outside Graphene
2 parents bec07aa + efe1bed commit 04275b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/js/graphene.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22

33
class Graphene
4+
constructor:->
5+
@models = {}
6+
47
demo:->
58
@is_demo = true
69

@@ -18,6 +21,7 @@ class Graphene
1821
model_opts.refresh_interval = json[k].refresh_interval
1922
delete json[k].refresh_interval
2023
ts = new klass(model_opts)
24+
@models[k] = ts
2125

2226
_.each json[k], (opts, view)=>
2327
klass = eval("Graphene.#{view}View")

0 commit comments

Comments
 (0)