app/models/programme.rb
def activate
    if can_activate?
      self.update_attribute(:is_activated,true)
      self.update_attribute(:activation_rejection_reason,nil)
    end
  end
# callback, activates if current user is an admin or nil, otherwise it needs activating
callback, activates if current user is an admin or nil, otherwise it needs activating
callback activates if current user is an admin or nil otherwise it needs activating
def activate
    if can_activate?
      self.update_attribute(:is_activated,true)
      self.update_attribute(:activation_rejection_reason,nil)
    end
  end
def activate if can_activate? self . update_attribute ( :is_activated , true ) self . update_attribute ( :activation_rejection_reason , nil ) end end
callback, activates if current user is an admin or nil, otherwise it needs activating
callback activates if current user is an admin or nil otherwise it needs activating