Module: IsContacted

Defined in:
lib/is_contacted.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Instance Method Summary collapse

Instance Method Details

#is_contactedObject

Call this in your model to enable replacable model

Example:

class Android < ActiveRecord::Base

is_contacted

end



11
12
13
14
15
# File 'lib/is_contacted.rb', line 11

def is_contacted
  raise "Should have contact_id integer column" unless self.columns.map(&:name).include?("contact_id")
  extend ClassMethods
  include InstanceMethods
end