Fixes #306 - Rails 4 upgrade

Fixes #306 - Migrates application to Rails 4. 

@monfresh ready for review and merge.