Module: Congo::List

Defined in:
lib/congo/list.rb

Defined Under Namespace

Modules: ContentInstanceMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/congo/list.rb', line 4

def self.included(model)
  model.class_eval do
    include InstanceMethods
    
    def to_const_with_list
      klass = to_const_without_list
      apply_list(klass)
      klass
    end
    
    alias_method_chain :to_const, :list
  end
end