updated code to be more compatible with rails, added examples to readme
Merge pull request #2 from eatenbyagrue/master

Rails compatibility and updated docs