Merge pull request #30 from bousquet/rails4

Rails4 compatibility
Merge pull request #31 from bousquet/rails4

Rails4