Class: Soulless::Model

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Callbacks, ActiveModel::Naming, ActiveModel::Translation, Inheritance, Serialization
Includes:
ActiveModel::AttributeMethods, ActiveModel::Dirty, ActiveModel::SecurePassword, ActiveModel::Serialization, ActiveModel::Validations, Attributes, Callbacks, Dirty, Validations
Defined in:
lib/soulless/model.rb

Instance Method Summary collapse

Methods included from Inheritance

get_active_record_attributes, get_attribute_names, get_attributes, get_virtus_attributes, include_attribute?, inherit_from, setup_validators, skip_validators?, translate_primitive

Methods included from Serialization

dump, load

Methods included from Validations

included

Methods included from Dirty

#apply_changes, #reload_changes!, #rollback_changes!

Methods included from Attributes

prepended

Methods included from Callbacks

prepended, #valid?

Constructor Details

#initialize(params = {}) ⇒ Model

Returns a new instance of Model.



24
25
26
27
28
# File 'lib/soulless/model.rb', line 24

def initialize(params = {})
  super

  apply_changes
end

Instance Method Details

#i18n_scopeObject



30
31
32
# File 'lib/soulless/model.rb', line 30

def i18n_scope
  :soulless
end

#persisted?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/soulless/model.rb', line 34

def persisted?
  false
end