app/models/programme.rb
def handle_administrator_ids
    new_administrators = Person.find(administrator_ids)
    to_add = new_administrators - programme_administrators
    to_remove = programme_administrators - new_administrators
    to_add.each do |person|
      person.is_programme_administrator = true, self
      disable_authorization_checks { person.save! }
    end
    to_remove.each do |person|
      person.is_programme_administrator = false, self
      disable_authorization_checks { person.save! }
    end
  end
# set the administrators, assigned from the params to :adminstrator_ids
set the administrators, assigned from the params to :adminstrator_ids
set the administrators assigned from the params to : adminstrator_ids
def handle_administrator_ids
    new_administrators = Person.find(administrator_ids)
    to_add = new_administrators - programme_administrators
    to_remove = programme_administrators - new_administrators
    to_add.each do |person|
      person.is_programme_administrator = true, self
      disable_authorization_checks { person.save! }
    end
    to_remove.each do |person|
      person.is_programme_administrator = false, self
      disable_authorization_checks { person.save! }
    end
  end
def handle_administrator_ids new_administrators = Person . find ( administrator_ids ) to_add = new_administrators - programme_administrators to_remove = programme_administrators - new_administrators to_add . each do | person | person . is_programme_administrator = true , self disable_authorization_checks { person . save! } end to_remove . each do | person | person . is_programme_administrator = false , self disable_authorization_checks { person . save! } end end
set the administrators, assigned from the params to :adminstrator_ids
set the administrators assigned from the params to : adminstrator_ids