Created
September 29, 2014 10:21
-
-
Save aishek/650ad4193ab0bd60da27 to your computer and use it in GitHub Desktop.
grape api Api class usage example
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
# app/controllers/api.rb | |
class Api < Grape::API | |
mount ::Api::V1 | |
end |
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
# config/routes.rb | |
App::Application.routes.draw do | |
mount Api => '/api' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment