Module: CatForms::Form

Defined in:
lib/cat_forms.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/cat_forms.rb', line 25

def self.included base
  base.send :include, ActiveModel::Validations
  base.send :extend,  ActiveModel::Callbacks
  base.send :include, Virtus.model
  base.send :extend, ClassMethods
  base.send :include, InstanceMethods
  base.send :include, ValidationScopes
  base.instance_eval do
    define_model_callbacks :initialize, :save
    class_attribute :_form_name
  end
end