Is it mandatory that, for an association between two models, I have belongs_to
and has_one
? Or is it possible to only use has_one/has_many
between the two models, when not necessarily none of the models belong to any other?
Example:
class Article < ActiveRecord::Base
has_one :category
end
class Category < ActiveRecord::Base
has_many :articles
end