Module: Card::Set::All::Permissions::ClassMethods

Defined in:
card/tmpsets/set/mod010-card-mod-permissions/all/permissions.rb,
card/tmpsets/set/mod009-card-mod-permissions/all/permissions.rb

Instance Method Summary collapse

Instance Method Details

#repair_all_permissionsObject



9
10
11
12
13
14
15
# File 'card/tmpsets/set/mod010-card-mod-permissions/all/permissions.rb', line 9

def repair_all_permissions
  Card.where("(read_rule_class is null or read_rule_id is null) and trash is false")
      .each do |broken_card|
    broken_card.include_set_modules
    broken_card.repair_permissions!
  end
end