This is an example of a versioned Rails API using HTTP "accept" headers rather than including the version in resource URIs.
- Ruby 1.9 or >
- Postgres (I like http://postgresapp.com)
-
Clone the repo
git clone https://github.com/iamvery/farticles.git cd farticles
-
Install dependencies
bundle install
-
Setup database
bin/rake db:setup
Start the local development server:
bin/rails s
Request version 1 articles:
bin/rake request:v1:articles
[]
Request version 2 articles:
bin/rake request:v2:articles
{}