Class: Editstore::State

Inherits:
Connection
  • Object
show all
Defined in:
app/models/editstore/state.rb

Class Method Summary collapse

Class Method Details

.appliedObject



33
34
35
# File 'app/models/editstore/state.rb', line 33

def self.applied
  @@applied ||= self.find_by_name('applied')
end

.completeObject



37
38
39
# File 'app/models/editstore/state.rb', line 37

def self.complete
  @@complete ||= self.find_by_name('complete')
end

.errorObject



29
30
31
# File 'app/models/editstore/state.rb', line 29

def self.error
  @@error ||= self.find_by_name('error')
end

.in_processObject



25
26
27
# File 'app/models/editstore/state.rb', line 25

def self.in_process
  @@in_process ||= self.find_by_name('in process')
end

.readyObject



21
22
23
# File 'app/models/editstore/state.rb', line 21

def self.ready
  @@ready ||= self.find_by_name('ready')
end

.waitObject

these helper methods allow you to easily refer to a particular state like this, with the query cached in the object: Editstore::State.wait Editstore::State.ready



17
18
19
# File 'app/models/editstore/state.rb', line 17

def self.wait
  @@wait ||= self.find_by_name('wait')
end