This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 () {}); | |
| }) | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem "ember-source", :git => 'https://github.com/emberjs/ember.js.git', :ref => '8b14532a3784ff467259a5a88a249a1283b9b47e' | |
| gem "handlebars-source", "~> 1.3.0" | |
| gem 'ember-rails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| model: function () { | |
| var route = this; | |
| return this.get('store').findAll('lens').then(function (lenses) { | |
| route.transitionTo('lens', lenses.get('firstObject')); | |
| }); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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>', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # application.handlebars | |
| {{outlet}} | |
| # main_layout.handlebars | |
| <div class="hai-layoutz"> | |
| {{outlet}} | |
| </div> | |
| # home.handlebars | |
| <div class="totes-different-layout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if existing_user | |
| return unless existing_user.claimed? | |
| existing_user.transfer_and_destroy!(:destination_user => user) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Test | |
| def test=(test) | |
| @test = test | |
| end | |
| def test | |
| @test | |
| end | |
| def test2 | |
| test = "hello!" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyConcatFilter < Rake::Pipeline::ConcatFilter | |
| def generate_output(inputs, output) | |
| inputs.each do |input| | |
| output.write input.read | |
| output.write "\n" | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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({}); |