Skip to content

Instantly share code, notes, and snippets.

@raila
raila / gist:4590683
Last active December 11, 2015 10:59
App.WhateverRoute = Ember.Route.extend
setupController: (controller) ->
applicationController = @controllerFor('application')
applicationController.set 'title', 'new title'
App.WhateverController = Ember.ObjectController.extend
setTitle: ->
@send('setTitle', 'new title')
# ROUTER
GWS.Router.map (match) ->
#match("/").to("home") # home.handlebars gets rendered automatically and mapped to /
# according to guide the previous logic shouldn't be needed. but it won't work without it
# you can either use model: () -> or
# setupController: (controller, model) ->
# controller.set 'content', model
@raila
raila / html
Created August 28, 2011 00:32
batman keypath test
# Create our application and namespace.
class Alfred extends Batman.App
@global yes
# setup our root route. When the app starts up, it will automatically call TodosController::index
@root 'todos#index'
# Define the principal Todo model with `body` and `isDone` attributes, and tell it to persist itself using Local Storage.
class Alfred.Todo extends Batman.Model
@raila
raila / html
Created August 28, 2011 00:24
batman keypath test
# Create our application and namespace.
class Alfred extends Batman.App
@global yes
# setup our root route. When the app starts up, it will automatically call TodosController::index
@root 'todos#index'
# Define the principal Todo model with `body` and `isDone` attributes, and tell it to persist itself using Local Storage.
class Alfred.Todo extends Batman.Model