Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

Grape Api


  • Grape is a REST-like API micro-framework for Ruby. It’s designed to run on Rack or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs.
  • Here is a nice slide share of the API possibilities (though it is from 2011).
  • some tips here


  • Rack::Cors provides support for Cross-Origin Resource Sharing (CORS) for Rack compatible web applications. The CORS spec allows web applications to make cross domain AJAX calls without using workarounds such as JSONP.
  • explaination worth reading

Trouble with protected_attributes

  • rails 4 – learned via issue 12360 that protected_attr needs to be up to date. In my case, v 1.0.5.

Rack Console

  • used gem racksh for a rack console. Pretty dandy.

Mind fck

  • active_record_migrations worked when vendored locally, but the config options were not configuring anything when remote.
  • ended up using the DATABASE_URL env instead of database.yml to configure the postgres DB.