Remove Rails 3 active_record code to optimize for Rails 4