Can you mixin 'has_many', etc., into models?

Has_many is a class method, you need to invoke it against the class
which includes your module:

module BlogUser
   def self.included(includer)
      includer.class_eval do
           has_many :blogs_created, :class_name => 'Blog',
:foreign_key => 'created_by'
      end
  end
end

Rick Denatale wrote: