Designing Web Service Using Ruby on Rails - Mapping ActiveRecord Models

Posted by michaeldelorenzo on Stack Overflow See other posts from Stack Overflow or by michaeldelorenzo
Published on 2010-05-25T02:42:59Z Indexed on 2010/05/25 2:51 UTC
Read the original article Hit count: 379

I've put together a RoR application and would now like to publish a RESTful web service for interacting with my application.

I'm not sure where to go exactly, I don't want to simply expose my ActiveRecord models since there is some data on each model that isn't needed or shouldn't be exposed via an API like this. I also don't want to create a SOAP solution.

My application is built using Rails 2.3.5 and I hope to move to Rails 3.0 soon after its released.

I'm basically looking for a way to map my ActiveRecord models to "models" that would be exposed via the web service. Is ActiveResource the correct thing to use? What about ActionWebService?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about web-services