updated for rails 4 and ruby 2
Merge branch 'rails4'
Merge pull request #63 from paterson/master

Updated for Ruby 2 and Rails 4