Created
December 5, 2012 16:26
-
-
Save sktoiva/4217131 to your computer and use it in GitHub Desktop.
This file contains 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
Spine = require('spine') | |
class Exercise extends Spine.Model | |
@configure 'Exercise', 'repetitions', 'sets', 'weight' | |
@extend @Local | |
module.exports = Exercise |
This file contains 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
require('lib/setup') | |
Spine = require('spine') | |
Exercises = require('controllers/exercises'); | |
class App extends Spine.Controller | |
constructor: -> | |
super | |
console.log("Index initialized") | |
@exercises = new Exercises | |
@append @exercises | |
Spine.Route.setup(history: true) | |
module.exports = App | |
This file contains 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
Spine = require('spine') | |
Exercise = require('models/exercise') | |
class Exercises extends Spine.Controller | |
constructor: -> | |
super | |
console.log("Exercises") | |
Exercise.bind("refresh", @render) | |
Exercise.fetch(); | |
render: -> | |
console.log(@) | |
@html require('views/exercise') | |
module.exports = Exercises |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment