Rails API

1) follow  railcast no:-348

In /public/index.html file

use function addTask as the following way instead of described

function addTask(ta) {
$(‘#tasks’).append(‘<li>’ + ta.task.name + ‘</ul>’);
}

Reference

1) http://railscasts.com/episodes/348-the-rails-api-gem?view=asciicast
2) https://github.com/rails-api/rails-api
3) http://davidsulc.com/blog/2011/04/10/implementing-a-public-api-in-rails-3/

 

Securing a API  ( but not find a solution to work with the above API )

1) follow the railcast no:352. it describes

a) Using HTTP Basic Authentication
b) Authentication Via an Access Token

Reference

1)http://railscasts.com/episodes/352-securing-an-api?view=asciicast

http://www.klairvoyant.in

This entry was posted in rails, ROR, ruby on rails, web development and tagged , , , , , , . Bookmark the permalink.

1 Response to Rails API

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s