I have an "Factory module" which has "has_many" relationship with "Icecream Model". I have done mixin of factory module with another "Owner model" so that i can have a relationship of "owner" with "icecreams table". Problem is I am not able to fetch icecreams with the "owner" object i think something is wrong with the relationship definition. The definition from Factory model is below.
module Factory
extend ActiveSupport::Concern
included do
has_many :icecreams, :dependent => :nullify
end
The relationship definition from Icecream is like this
Class Icecream < ActiveRecord::Base
belongs_to :factory, :class_name => "Owner", :foreign_key => "factory_id"