Created
October 2, 2016 23:39
-
-
Save netodevel/459985de99e3ab63f111ee1c508653c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api::V1::UserController < ApplicationController | |
def index | |
@api_v1_users = User.all | |
render json: @api_v1_users | |
end | |
end | |
### | |
class ApplicationController < ActionController::Base | |
protect_from_forgery with: :null_session | |
end | |
### | |
Rails.application.routes.draw do | |
namespace :api do | |
namespace :v1 do | |
resources :users | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment