title: Saving data gives a error, param is missing or the value is empty
body: <p>I´m trying to save an input to my database using Angular and Rails. At the moment when the action is performed I get a <code>400 (Bad Request)</code> error in the console log and the Rails error is as following,</p>
  
  <pre><code>Started POST "/movies.json" for 127.0.0.1 at 2015-08-24 07:57:09 +0200
  Processing by MoviesController#create as JSON
    Parameters: {"titles"=&gt;"Star", "movie"=&gt;{}}
    User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ?  ORDER BY "users"."id" ASC LIMIT 1  [["id", 1]]
  Completed 400 Bad Request in 12ms (ActiveRecord: 0.2ms)
  
  ActionController::ParameterMissing (param is missing or the value is empty: title):
    app/controllers/movies_controller.rb:24:in `movie_params'
    app/controllers/movies_controller.rb:8:in `create'
  </code></pre>
  
  <p>Routes.rb</p>
  
  <pre><code>resources :movies, only: [:create, :index, :show] do
  end
  </code></pre>
  
  <p>The search.html.haml template used, here a user should input the title.</p>
  
  <pre><code>#addMovie{"ng-controller" =&gt; "addMovieCtrl"}
    %div{"ng-click" =&gt; "addMovie()"}
      %input{:type =&gt; "text", "ng-model" =&gt; "title"}
      addMovie action.
  </code></pre>
  
  <p>My movieController.js, this is the action that fires when a user clicks on the div in the <code>#addMovie</code></p>
  
  <pre><code>angular.module('addMovieseat', ['ui.router', 'templates'])
  
    .controller('addMovieCtrl', ['$scope', 'movies',
      function($scope, movies){
        $scope.movies = movies.movies;
  
        $scope.addMovie = function(){
  
          if(!$scope.title || $scope.title === '') { return; }
          movies.create({
            titles: $scope.title,
          });
          $scope.title = '';
        };
      }
    ])
  </code></pre>
  
  <p>The angular service,</p>
  
  <pre><code>angular.module('addMovieseat')
  
    .factory('movies', ['$http', function($http){
      var o = {
        movies: []
      };
  
      o.create = function(movie){
        return $http.post('/movies.json', movie).success(function(data){
          o.movies.push(data);
        });
      };
  
      return o;
  
    }])
  </code></pre>
  
  <p>And the movies_controller.rb</p>
  
  <pre><code>class MoviesController &lt; ApplicationController
  
    def index
      respond_with Movie.all
    end
  
    def create
      respond_with Movie.create(movie_params)
    end
  
    private
    def movie_params
      params.require(:movie).permit(:title)
    end
  
  end
  </code></pre>