Rails 3.1 record object instantiating twice in Controller actions?

110 views Asked by At

I have a controller that basically fetches a record and instantiates into an object.
When it runs, the object is instantiated twice with different object_ids.

e.g.

def index
    @users= Users.all
    puts @users.object_id
end

This prints two different ids on the terminal where rails is running (only in rails 3.1). In Rails 3 its only one id. It also instantiated two different user objects to two queries to the DB or Resource.

I have no clue. I don't even know what to google for. I saw something about ActiveRecord::IdentityMaps but I don't understand what's wrong here.

0

There are 0 answers