Skip to content

Instantly share code, notes, and snippets.

@erikpukinskis
Created April 3, 2014 21:50
Show Gist options
  • Save erikpukinskis/9963619 to your computer and use it in GitHub Desktop.
Save erikpukinskis/9963619 to your computer and use it in GitHub Desktop.
App = Ember.Application.create();
App.Router.map(function() {
this.route('producer', {path: '/producer'});
});
App.ProducerTileView = Ember.View.extend({
classNameBindings: ['selected'],
click: function() {
this.set('selected', !this.get('selected'));
}
});
App.ProducerTileController = Ember.ObjectController.extend({
actions: {
capitalize: function() {
this.set('name', this.get('name').toUpperCase());
},
}
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return [
{
id: 1,
name: 'Bellwether Farms',
imageUrl: 'http://goodeggs.imgix.net/vendor_photo/NAkExzKuQRynFfzO0urV_home-2.2.jpg?w=560&h=350&fm=jpg&q=41&fit=crop&crop=faces'
},
{
id: 2,
name: 'Primavera',
imageUrl: 'http://goodeggs.imgix.net/vendor_photo/3KuHpRJ0SQSdbbvXA1xc_primavera.jpg?w=560&h=350&fm=jpg&q=41&fit=crop&crop=faces'
},
];
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment