Fix active model integration with Rails 3.2, eager access to attributes method and method-defined check