Fix to allow code to work with Rails 3 and Rails 4
Merge pull request #11 from dkubb/rails4

Fix to allow code to work with Rails 3 and Rails 4