Skip to content

Instantly share code, notes, and snippets.

View endash's full-sized avatar

Christopher Swasey endash

View GitHub Profile
App.Router.map(function() {
this.route('sign_in');
this.resource("calendar", function () {
this.resource("calendar_month", {path: 'month'}, function () {});
this.resource("calendar_week", {path: 'week'}, function () {});
this.resource("calendar_day", {path: 'day'}, function () {});
})
});
gem "ember-source", :git => 'https://github.com/emberjs/ember.js.git', :ref => '8b14532a3784ff467259a5a88a249a1283b9b47e'
gem "handlebars-source", "~> 1.3.0"
gem 'ember-rails'
App.Router.map(function() {
...
this.resource('lenses', function(){
this.route('index');
this.resource('lens', {path: '/:lens_id'}, function() {
this.route('technical_data');
this.route('grids');
this.route('angles_of_view');
});
});
model: function () {
var route = this;
return this.get('store').findAll('lens').then(function (lenses) {
route.transitionTo('lens', lenses.get('firstObject'));
});
},
App.UserTypeaheadView = Ember.TextField.extend({
clientId: null,
didInsertElement: function () {
this.$().typeahead({
name: 'client',
template: Handlebars.compile([
'<img src="{{icon_url}}" width="48" height="48" class="pull-left">',
'<label>',
'<strong>{{value}}</strong><br>',
# application.handlebars
{{outlet}}
# main_layout.handlebars
<div class="hai-layoutz">
{{outlet}}
</div>
# home.handlebars
<div class="totes-different-layout>
if existing_user
return unless existing_user.claimed?
existing_user.transfer_and_destroy!(:destination_user => user)
end
class Test
def test=(test)
@test = test
end
def test
@test
end
def test2
test = "hello!"
end
class MyConcatFilter < Rake::Pipeline::ConcatFilter
def generate_output(inputs, output)
inputs.each do |input|
output.write input.read
output.write "\n"
end
end
end
var Node = Ember.extend({
datasource: null,
links: Ember.computed(function () {
var ds = this.get('datasource');
if (ds) return ds.linksForNode(this.get('id));
return [];
}).property()
});
var Link = Ember.extend({});