Doesn't "find" call initialize?


#1

class Item < ActiveRecord::Base

def initialize(*args)
super
@x = 5

end

def print_x
puts @x
end
end

item_new = Item.new
item_new.print_x # output: 5

item_find = Item.find(1) # this record is in the database
item_find.print_x # output: nil

I thought the output would be 5 in both cases, since Item.find returns a
new object of Item and so Item.initialize would be called