app/assets/javascripts/todo_rails/controllers/todoCtrl.coffee in todo_rails-0.1.2 vs app/assets/javascripts/todo_rails/controllers/todoCtrl.coffee in todo_rails-0.1.3
- old
+ new
@@ -6,9 +6,12 @@
angular.module('todoRails.controllers').controller 'todoCtrl', [
'$scope', 'Restangular'
($scope, Restangular) ->
todos = Restangular.all('tasks')
+ $scope.saveTodo = (todo) ->
+ todo.save()
+
$scope.reload = ->
$scope.todos = todos.getList().$object
$scope.reload()