title: Creating User with Rails API and JSON?
body: <p>So I'm testing out a very simple API in Rails to see if I can create a user from it locally using the Chrome plugin Postman (REST Client extension).</p>
  
  <p>In my rails app, I've set up a folder/namespace for my API, and whenever I try to create my user, I get the following error:
  Missing template api/v1/users/create, application/create with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "PATH/app/views"</p>
  
  <p>I'm using Rails 4.0.1 and Ruby 2.0</p>
  
  <p>I'm posting a screenshot below of what I'm posting:</p>
  
  <p><img src="https://i.stack.imgur.com/BEFDh.png" alt="Screenshot 1"></p>
  
  <pre><code>module Api
       module V1
      class UsersController &lt; ApplicationController
          class User &lt; ::User
              # add any hacks
          end
  
          respond_to :json
  
          def index
              respond_with User.all
          end
  
          def show
              respond_with User.find(params[:id])
          end
  
          def new
              @user = User.new
          end
  
          def create
              @user = User.create(user_params)
              # respond_with(@user)
  
              if @user.save
                  # render json: @user, status: :created, location: @user
                  redirect_to @user
              end
          end
  
          private
  
              def user_params
                params.require(:user).permit(:name, :age, :location) if params[:user]
              end
      end
    end
  end
  </code></pre>
  
  <p>So based on my user_params, I should be able to create a new user, correct?
  Please let me know if you need any additional info and I'll do my best to respond ASAP!
  Thanks!</p>