Fix deprecated paths

Fix deprecated paths for Rails 4.