Congrats on using learning rails! You will have to use accepts_nested_attributes_for
in your Company
model in order to assign attributes directly to the Accounttype
model. Like so:
belongs_to :accounttype
accepts_nested_attributes_for :accounttype
attr_accessible :description, :location_city, :location_state, :name, :accounttypes_attributes
Notice since you are using attr_accessible you have to add accounttypes_attributes
Also, I would suggest changing Accounttype
to AccountType