Sha256: 292e9f1d217fc2f491734e4c726aa132c470fed004a01a4cbe049c68a4a8223d
Contents?: true
Size: 517 Bytes
Versions: 48
Compression:
Stored size: 517 Bytes
Contents
# Before the 'notify' permission was added, only users with the first relation in each group where notified by email # This migration preserves the old behavior by granting the 'notify' permission to the first relation in each group class UpdateNotifyPermissions < ActiveRecord::Migration def up perm_notify = Permission.find_or_create_by_action('notify') Group.all.each do |g| r = g.relation_customs.first next if r.blank? r.permissions << perm_notify end end def down end end
Version data entries
48 entries across 48 versions & 2 rubygems