diff options
-rw-r--r-- | app/assets/javascripts/services/notes.js | 6 | ||||
-rw-r--r-- | app/views/home/main.html.erb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/services/notes.js b/app/assets/javascripts/services/notes.js index 389f25d..bda6ae7 100644 --- a/app/assets/javascripts/services/notes.js +++ b/app/assets/javascripts/services/notes.js @@ -6,7 +6,7 @@ angular var Note = $resource('/notes/:id.json', { id: '@id' }, { - save: { + update: { method: 'PUT' } }); @@ -23,8 +23,8 @@ angular this.current_note = note; }, - save: function() { - this.current_note.$save(); + update: function() { + this.current_note.$update(); }, create: function () { diff --git a/app/views/home/main.html.erb b/app/views/home/main.html.erb index 5117084..d7a2d65 100644 --- a/app/views/home/main.html.erb +++ b/app/views/home/main.html.erb @@ -18,7 +18,7 @@ <a href="#" class="button margin-left-8" ng-show="noteService.current_note" - ng-click="noteService.save()">Save</a> + ng-click="noteService.update()">Save</a> </div> </div> </div> |