Rails 4 compatibility
Merge pull request #40 from pawelnguyen/rails-4

Rails 4 compatibility