Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
App.featureDeploys = SC.Object.create({
deploy: function() {
// code in here
App.FeatureView = SC.View.extend({
classNames: ['feature'],
templateName: 'feature',
createdAt: function () {
return $.timeago.distanceInWords(this.getPath('content.createdAt'));
<script type="text/x-handlebars" data-template-name="feature">
{{#if content.body}}
<abbr {{bindAttr title="content.createdAt"}}>{{createdAt}}</abbr>
{{#if content.waitingDeployment}}
{{#view SC.Button target="App.featureDeploy" action="deploy" class="deploy-now"}}
{{#if content.isDeployed}}
{{#view SC.Button target="App.featureDeploys" action="view" class="deploy-now"}}
View Feature
<script type="text/x-handlebars">
{{collectionView App.OpenFeaturesView id="open-features"}}
App.OpenFeaturesView = SC.CollectionView.extend({
content: [],
itemViewClass: App.FeatureView

tatey commented Nov 7, 2011

It's not Backbone.js.


coop commented Nov 7, 2011

@tatey trollololol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment