Module: ActiveRecord::ModelInheritance::Model

Extended by:
ActiveSupport::Concern
Defined in:
lib/active_record/model_inheritance/model.rb

Instance Method Summary collapse

Instance Method Details

#_model_inheritance_baseObject



128
129
130
# File 'lib/active_record/model_inheritance/model.rb', line 128

def _model_inheritance_base
  public_send model_inheritance_base_name
end

#_model_inheritance_innerObject



132
133
134
# File 'lib/active_record/model_inheritance/model.rb', line 132

def _model_inheritance_inner
  public_send model_inheritance_inner_name
end

#deleteObject



123
124
125
126
# File 'lib/active_record/model_inheritance/model.rb', line 123

def delete
  _model_inheritance_inner.delete
  super
end

#destroyObject



118
119
120
121
# File 'lib/active_record/model_inheritance/model.rb', line 118

def destroy
  _model_inheritance_inner.destroy
  super
end

#save(**options) ⇒ Object



107
108
109
110
# File 'lib/active_record/model_inheritance/model.rb', line 107

def save(**options, &)
  prepare_save
  super && _model_inheritance_base.save
end

#save!(**options) ⇒ Object



112
113
114
115
116
# File 'lib/active_record/model_inheritance/model.rb', line 112

def save!(**options, &)
  prepare_save
  super
  _model_inheritance_base.save!
end