Fixes #306 - Rails 4 upgrade

Migrates application to Rails 4. 

@monfresh ready for review and merge.