search for: to_state

Displaying 2 results from an estimated 2 matches for "to_state".

Did you mean: t_state
2009 Jun 29
0
[PATCH server] REVISED Vm state change auditing/accounting
...lass Vm < ActiveRecord::Base :order => 'time_started DESC', :dependent => :destroy + + has_many :vm_state_change_events, + :order => 'created_at' do + def previous_state_with_type(state_type) + find(:first, :conditions=> { :to_state => state_type }, :order=> 'created_at DESC') + end + end + alias history vm_host_histories validates_presence_of :uuid, :description, :num_vcpus_allocated, @@ -138,6 +146,25 @@ class Vm < ActiveRecord::Base STATE_CREATE_FAILED = "create_failed" STATE_IN...
2009 Jun 24
1
[PATCH server] Vm state change auditing/accounting
...lass Vm < ActiveRecord::Base :order => 'time_started DESC', :dependent => :destroy + + has_many :vm_state_change_events, + :order => 'created_at' do + def previous_state_with_type(state_type) + find(:first, :conditions=> { :to_state => state_type }, :order=> 'created_at DESC') + end + end + alias history vm_host_histories validates_presence_of :uuid, :description, :num_vcpus_allocated, @@ -138,6 +146,25 @@ class Vm < ActiveRecord::Base STATE_CREATE_FAILED = "create_failed" STATE_IN...