Module: Sid

Defined in:
lib/sid.rb,
lib/sid/class_methods.rb,
lib/sid/instance_methods.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Instance Method Summary collapse

Instance Method Details

#has_sid(scoped_by, options = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/sid.rb', line 5

def has_sid(scoped_by, options={})
  cattr_accessor :sid_config
  self.sid_config={}
  self.sid_config[:scoped_by] = scoped_by
  self.sid_config[:sid_column] = options[:sid_column] || :sid

  include Sid::ClassMethods
  include Sid::InstanceMethods
end