Angular resource - bind to Rails RESTful API

I was looking at AngularJs Resource documentation and it states that default actions for accessing API are: {'get': {method:'GET'}, 'save': {method:'POST'}, 'query': {method:'GET', isArray:true}, 'remove': {method:'DELETE'}, 'delete': {method:'DELETE'} };

This is a bit different from Rails RESTful API where we have index,show,new,create,edit,update and discard. Is there an "automatic" way to bind these two without writing the path manually? Thanks!

ps. why remove and delete, where's put for update?

ngResource simply uses different names for usual REST conventions. So for example:

var User = $resource('/user/:userId', {userId:'@id'});
var user = User.get({userId:123}, function() {
  // do something with user
});

In this example User.get()sends the following request GET /user/123 which Rails routing logic passes to UserController#show action.

Regarding the update method, you can simply create one yourself:

var User = $resource('/user/:id', {}, {
    update: {
      method: 'PUT'
    }

}