Class: SyncItem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/sync_item.rb

Class Method Summary collapse

Class Method Details

.reset_flags(container) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sync_item.rb', line 5

def self.reset_flags(container)
counter = 0

  SyncItem.find_all_by_group(container.group).each {|flag|
    flag.status = 0
    flag.save
    counter += 1
  }

  SyncItem.logger.info("Reset status for the set '#{container.group}'")

  counter
end