title: Wrap parameters in AngularJS service for update API request
body: <p>I'm trying to do update with AngularJS and API</p>
  
  <p>Service: expense.js </p>
  
  <pre><code>angular
    .module('timeTrackerApp.services',[])
    .service('Expense', ['$resource', function ($resource) {
      return $resource('/api/v1/expenses/:id', {id:'@id'}, {
        'update': {
          method: 'PUT'
        },
        'destroy': {
          method: 'DELETE'
        }
      })
    }])
  </code></pre>
  
  <p>Controller: expenses_controller.rb</p>
  
  <pre><code>def permitted_params
     params.require(:expense).permit(:name, :price)
  end
  </code></pre>
  
  <p>So expected JSON format is { expense: { name: "value", price: value } }
  <br/>
  but i'm getting  { name: "value", price: value } </p>
  
  <p>So can anyone help me wrap this into root node ( expense ) ?</p>