Module: MongoModel::RecordStatus

Extended by:
ActiveSupport::Concern
Defined in:
lib/mongomodel/concerns/record_status.rb

Instance Method Summary collapse

Instance Method Details

#destroyed?Boolean



11
12
13
# File 'lib/mongomodel/concerns/record_status.rb', line 11

def destroyed?
  @_destroyed
end

#initializeObject



15
16
17
18
19
20
# File 'lib/mongomodel/concerns/record_status.rb', line 15

def initialize(*)
  set_new_record(true)
  set_destroyed(false)

  super
end

#new_record?Boolean



7
8
9
# File 'lib/mongomodel/concerns/record_status.rb', line 7

def new_record?
  @_new_record
end