Modifications for Rails 3.2