{:uriI"file:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/data/ModelPrepper.js.cjsx?type=application/javascript&pipeline=self&id=facea8146ebe90ed33eb785ae7cb05a1b3c892319d50ac5e4fba02859b1bdfac:ET:load_pathI"8/Users/joel/src/revelry_core/app/assets/javascripts;F: filenameI"Z/Users/joel/src/revelry_core/app/assets/javascripts/revelry/data/ModelPrepper.js.cjsx;T: nameI"revelry/data/ModelPrepper;T:logical_pathI"&revelry/data/ModelPrepper.self.js;T:content_typeI"application/javascript;T: sourceI"I(function() { Rev.registerComponent('ModelPrepper', { mixins: [Rev.Mixins.BackboneStore], getInitialState: function() { var state; return state = { model: null, error: null }; }, componentWillMount: function() { return this.fetch(); }, get: function() { return this.store.get(this.props.collection, this.props.model); }, fetch: function() { return this.store.fetch(this.props.collection, this.props.model, this.onFetchComplete); }, onFetchComplete: function() { var model; if (model = this.get()) { return this.setState({ model: model }); } else { return this.setState({ error: true }); } }, render: function() { if (this.state.model != null) { return this.success(); } else if (this.state.error != null) { return this.error(); } else { return this.wait(); } }, success: function() { if (this.props.onSuccess != null) { return this.props.onSuccess(this.state.model, this); } else { return this.props.children; } }, error: function() { if (this.props.onError != null) { return this.props.onError(this.retry); } else { return null; } }, wait: function() { if (this.props.onWait != null) { return this.props.onWait(); } else { return null; } }, retry: function() { return this.setState({ error: null }); } }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"hprocessors:type=application/javascript&file_type=application/javascript&engines=.cjsx&pipeline=self;TTI"hfile-digest:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/data/ModelPrepper.js.cjsx;TTI"Sfile-digest:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/data;TTI"afile-digest:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/data/BackboneStore;TTI"kfile-digest:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/data/BackboneStore.js.coffee;TT: requiredo;;{I"file:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/data/BackboneStore.js.coffee?type=application/javascript&pipeline=self;TT: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%?PݨY/޲J`