ed1t
ed1t

Reputation: 8689

Restful API in rails 3

How should I go about creating a restful API in rails 3 app? Also I would like to know if there is a good way to implement restful authentication

Upvotes: 4

Views: 2567

Answers (4)

Dave
Dave

Reputation: 43

If you're looking for a way to authenticate applications that are using your API, checkout the the restful_api_authentication gem - https://rubygems.org/gems/restful_api_authentication

Upvotes: 2

HelloWorld
HelloWorld

Reputation: 7286

You can use plugin grape

Upvotes: 1

loneaggie
loneaggie

Reputation: 297

The easiest way to create RESTful authentication in Rails is the combination of a User Model and a Session controller. So you will have new(login), create(authenticate), destroy(logout) actions in the Session controller. Depending on the app its fairly easy to write your own authentication. This screencast shows how easy it is. Authentication in Rails 3.1

Upvotes: 1

alexcepoi
alexcepoi

Reputation: 708

Restful API in rails 3? Rails is restful.. just use routes [guide]

As for authentication, i strongly recommend devise. It's also the only one I have managed to get working on rails 3.

Upvotes: 7

Related Questions