vendor/assets/javascripts/angular-resource.js in angularjs-rails-1.2.20 vs vendor/assets/javascripts/angular-resource.js in angularjs-rails-1.2.21

- old
+ new

@@ -1,7 +1,7 @@ /** - * @license AngularJS v1.2.20 + * @license AngularJS v1.2.21 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; @@ -112,12 +112,12 @@ * * Where: * * - **`action`** – {string} – The name of action. This name becomes the name of the method on * your resource object. - * - **`method`** – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, - * `DELETE`, and `JSONP`. + * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`, + * `DELETE`, `JSONP`, etc). * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of * the parameter value is a function, it will be executed every time when a param value needs to * be obtained for a request (unless the param was overridden). * - **`url`** – {string} – action specific `url` override. The url templating is supported just * like for the resource-level urls. @@ -293,33 +293,33 @@ ``` * # Creating a custom 'PUT' request * In this example we create a custom method on our resource to make a PUT request * ```js - * var app = angular.module('app', ['ngResource', 'ngRoute']); + * var app = angular.module('app', ['ngResource', 'ngRoute']); * - * // Some APIs expect a PUT request in the format URL/object/ID - * // Here we are creating an 'update' method - * app.factory('Notes', ['$resource', function($resource) { + * // Some APIs expect a PUT request in the format URL/object/ID + * // Here we are creating an 'update' method + * app.factory('Notes', ['$resource', function($resource) { * return $resource('/notes/:id', null, * { * 'update': { method:'PUT' } * }); - * }]); + * }]); * - * // In our controller we get the ID from the URL using ngRoute and $routeParams - * // We pass in $routeParams and our Notes factory along with $scope - * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', + * // In our controller we get the ID from the URL using ngRoute and $routeParams + * // We pass in $routeParams and our Notes factory along with $scope + * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', function($scope, $routeParams, Notes) { * // First get a note object from the factory * var note = Notes.get({ id:$routeParams.id }); * $id = note.id; * * // Now call update passing in the ID first then the object you are updating * Notes.update({ id:$id }, note); * * // This will PUT /notes/ID with the note object in the request payload - * }]); + * }]); * ``` */ angular.module('ngResource', ['ng']). factory('$resource', ['$http', '$q', function($http, $q) {