wingman_rails 0.0.12 → 0.0.13
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.
- data/vendor/assets/javascripts/wingman.js +13 -5
- metadata +4 -4
@@ -135,7 +135,7 @@
|
|
135
135
|
view = new this.constructor.RootView({
|
136
136
|
parent: this,
|
137
137
|
el: this.el,
|
138
|
-
|
138
|
+
state: this.get('state'),
|
139
139
|
childClasses: this.constructor.rootViewSiblings()
|
140
140
|
});
|
141
141
|
view.bind('descendantCreated', function(view) {
|
@@ -146,6 +146,14 @@
|
|
146
146
|
return view;
|
147
147
|
};
|
148
148
|
|
149
|
+
Application.prototype.state = function() {
|
150
|
+
return this._state || (this._state = this.createState());
|
151
|
+
};
|
152
|
+
|
153
|
+
Application.prototype.createState = function() {
|
154
|
+
return new Wingman.Object;
|
155
|
+
};
|
156
|
+
|
149
157
|
Application.prototype.buildController = function(view) {
|
150
158
|
var Controller;
|
151
159
|
Controller = this.controllerClassForView(view);
|
@@ -216,7 +224,7 @@
|
|
216
224
|
view: view
|
217
225
|
});
|
218
226
|
this.set({
|
219
|
-
|
227
|
+
state: view.state
|
220
228
|
});
|
221
229
|
this.setupBindings();
|
222
230
|
_Class.__super__.constructor.call(this);
|
@@ -2198,9 +2206,9 @@
|
|
2198
2206
|
parent: options.parent
|
2199
2207
|
});
|
2200
2208
|
}
|
2201
|
-
if ((options != null ? options.
|
2209
|
+
if ((options != null ? options.state : void 0) != null) {
|
2202
2210
|
this.set({
|
2203
|
-
|
2211
|
+
state: options.state
|
2204
2212
|
});
|
2205
2213
|
}
|
2206
2214
|
if ((options != null ? options.childClasses : void 0) != null) {
|
@@ -2246,7 +2254,7 @@
|
|
2246
2254
|
klass = this.get('childClasses')[className];
|
2247
2255
|
child = new klass({
|
2248
2256
|
parent: this,
|
2249
|
-
|
2257
|
+
state: this.get('state')
|
2250
2258
|
});
|
2251
2259
|
if (options != null ? options.properties : void 0) {
|
2252
2260
|
child.set(options.properties);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wingman_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
16
|
-
requirement: &
|
16
|
+
requirement: &70354341268980 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version: '5.0'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *70354341268980
|
28
28
|
description: This gem provides Wingman for your Rails 3 application.
|
29
29
|
email:
|
30
30
|
- rasmusrnielsen@gmail.com
|