Skip to content

Instantly share code, notes, and snippets.

@nileshlg2003
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save nileshlg2003/19de99087a8f3920ebd7 to your computer and use it in GitHub Desktop.

Select an option

Save nileshlg2003/19de99087a8f3920ebd7 to your computer and use it in GitHub Desktop.
rais-api
gem install rails-api
gem install rest-client
create controller/api/v1 folders
move controller.rb to /v1 folder
add namespace to routes.rb as follows,
namespace :api do
namespace :v1 do
resources :notes
end
edit controller.rb to
module Api
module
before class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment