got a simple rails integration working \o/

fixed some obvious bugs on the way