updated for Rails 3/4
Merge pull request #2 from Beartech/master

updated for Rails 3/4