Skip to content

jrpomeroy/todo-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dependencies

This application was created using ruby 2.3 and rails 5.1.

Running

Run the rails server in development mode using bin/rails server, then open http://localhost:3000 in your browser.

Rendering JSON

By default, todos are rendered as HTML. To get JSON, either add application/json to the Accept header for the request or set the json=true query parameter. This will work for requests to the todo list (/users/:user_id/todos) or todo detail (/users/:user_id/todos/:id). You will need a valid session cookie to make any requests for todos.

If logged into the app in the browser just append the query parameter to the url:

http://localhost:3000/users/:user_id/todos?json=true

Or from the command line:

curl --cookie "_todo_rails_session=xxxx" --header "Accept:application/json" http://localhost:3000/users/10/todos

About

An example todo application using ruby on rails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published