Module: Kuhsaft::Orderable

Included in:
Page
Defined in:
lib/kuhsaft/orderable.rb

Overview

If you use this mixin, your class must implement the following methods siblings(), returns the siblings of the same type of object

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
# File 'lib/kuhsaft/orderable.rb', line 6

def self.included base
  base.extend(ClassMethods)
  base.send :include, InstanceMethods
  base.after_create :set_position
end