Updated for Rails 4
Updated for Rails 4