I am trying to construct a users model manually (without using \'resources :users\' in the routes.rb file). My routes.rb file looks like this:
match \'/users/:id
For everyone who using rails 4 in your routes.rb post '/users', :to => 'users#create', :as => :user and you controller render json: @user, status: :created, location: @user_path
post '/users', :to => 'users#create', :as => :user
render json: @user, status: :created, location: @user_path