Class: Smriti::ApplicationRecord Abstract

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
SmritiI18n, SmritiPaginate, SmritiQueryHelper
Defined in:
app/models/smriti/application_record.rb

Overview

This class is abstract.

Base model class for all ActiveRecord models in the smriti engine.

Inherits from ActiveRecord::Base and marks itself as an abstract class. Other engine models should subclass this rather than inheriting directly from ActiveRecord::Base, so that shared behavior or configuration can be applied in one place.

Examples:

Define a new model under smriti

class Smriti::MatViewDefinition < Smriti::ApplicationRecord
  self.table_name = "mat_view_definitions"
end

Direct Known Subclasses

MatViewDefinition, MatViewRun

Method Summary

Methods included from SmritiPaginate

paginate

Methods included from SmritiI18n

hint_for, human_enum_name, human_enum_options, human_name, placeholder_for