14 Apr '13, 9pm

Building a fast, lightweight REST service with Rails 3 via @pivotallabs

I recently started building a Rails 3 app that will function as an internal REST service. I wanted it to be as lightweight and fast as possible, both to test and to run. Here are a few ways I configured the app to be a bit faster: Defined a limited route set Removed ActiveResource Removed unnecessary middleware Created a custom controller that inherits from Metal First, I defined the public api for my app in the routes file. I chose not to use resources because I don’t need named routes I wanted the :id parameter for the show action to be named :account_id instead of id (a pet peeve of mine with Rails routing) I only needed 3 of the routes generated by resources The routes file ended up looking like this: scope "/api/v1" do scope "/accounts" do post "/" => "accounts#create" get ":account_id" => "accounts#show" get ":account_id/transactions" => "accounts#transactions" put "...

Full article: http://pivotallabs.com/building-a-fast-lightweight-rest-s...

Tweets

Single resource REST Rails routes via @pivotall...

pivotallabs.com 17 Apr '13, 3am

REST principles by default is a fantastic convention within Rails applications. The documentation for how to route HTTP re...

Best practices for open sourcing your rails app...

railsforum.com 13 Apr '13, 3pm

Topic: Best practices for open sourcing your rails app and using git I want to: * Use git as my version control * Work in ...

Integration testing in the absurd land of Rails...

guides.rubyonrails.org 15 Apr '13, 12pm

Testing support was woven into the Rails fabric from the beginning. It wasn’t an “oh! let’s bolt on support for running te...

@95_derek This is the only SG one! The rest all...

ebay.com.sg 18 Apr '13, 2am

This amount includes seller specified US postage charges as well as applicable international postage, handling, and other ...

Modifying the order of Datetime picker in Rails

api.rubyonrails.org 16 Apr '13, 5am

:use_month_numbers - Set to true if you want to use month numbers rather than month names (e.g. "2" instead of "February")...

Diary of a Rails rescue project, part 2: Testin...

everydayrails.com 16 Apr '13, 4pm

Diary of a Rails rescue project, part 2: Testing April 16, 2013 As mentioned previously , I’ve been spending spare cycles ...

These are a few of my favorite things

michellephan.com 16 Apr '13, 9pm

I love that you don't only show fashion finds, but all finds! When you took up that portable s'mores maker I got a huge sm...

“@0x6D6172696F: I wonder if there's many applic...

api.rubyonrails.org 21 Apr '13, 7pm

Class HTML::Sanitizer < Object actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb

Fast Update #8 - Justkhai

Fast Update #8 - Justkhai

justkhai.com 19 Apr '13, 6pm

Baca balik Fast Update #7 sebelum ni, tersengih sendiri. Alahai banyaknya yang dah berubah dalam masa 3 tahun dari artikel...

New post: Building a replacement for a broken dehumidifier controller

New post: Building a replacement for a broken d...

hackaday.com 14 Apr '13, 7pm

We’ve thought of doing a project like this ourselves as the dehumidifier we ordered online runs the fan 24/7 no matter wha...

Double Shot #1107: Teabag – Javascript test run...

afreshcup.com 15 Apr '13, 11am

is Mike Gunderloy's software development weblog, covering Ruby on Rails and whatever else I find interesting in the univer...

Not So Fast Mr. Berkens! .Co Takes 2nd Big Blow...

ricksblog.com 15 Apr '13, 11am

The idiots and morons always IGNORE my main point. Because if they actually had to argue the MAIN POINT, they would go dow...

@azurani1975 Hi. Journeys should not be this lo...

translink.co.uk 20 Apr '13, 11am

Special holiday timetable operates on: Christmas and New Year, St Patrick's Day, Easter, May Day, July Holidays. Please re...

Where to good vegetarian fast food: It looks like there are good vegetarian fast food options out there, but y...

Where to good vegetarian fast food: It looks li...

mnn.com 17 Apr '13, 7pm

I asked my friends on Facebook who are vegetarian or make it a point to go meatless frequently what options they find at f...