Displaying 1 result from an estimated 1 matches for "internal_dim".
Did you mean:
internal_dev
2007 Oct 08
7
belongs_to association doesn't work with _id set
Hello there,
I''m developing an application which has models like this:
class Vehicle < ActiveRecord::Base
belongs_to :internal_dim, :class_name => "Dimension"
def before_create()
idim = Dimension.create
self.internal_dim_id = idim.id
#self.create_internal_dim # Doesn''t work
end
end
class Dimension < ActiveRecord::Base
has_one :vehicle
end
That is, creating the veh...