app/controllers/people_controller.rb
def removed_params
    # make sure to update people/_form if this changes
    #                   param                 => allowed access?
    removed_params = [:roles, :roles_mask, :work_group_ids]

    removed_params.each do |param|
      params[:person].delete(param) if params[:person]
      params.delete param if params
    end
  end
#checks the params attributes and strips those that cannot be set by non-admins, or other policy
checks the params attributes and strips those that cannot be set by non-admins, or other policy
checks the params attributes and strips those that cannot be set by non - admins or other policy
def removed_params
    removed_params = [:roles, :roles_mask, :work_group_ids]
    removed_params.each do |param|
      params[:person].delete(param) if params[:person]
      params.delete param if params
    end
  end
def removed_params removed_params = [ :roles , :roles_mask , :work_group_ids ] removed_params . each do | param | params [ :person ] . delete ( param ) if params [ :person ] params . delete param if params end end
checks the params attributes and strips those that cannot be set by non-admins, or other policy
checks the params attributes and strips those that cannot be set by non - admins or other policy
# make sure to update people/_form if this changes #                   param                 => allowed access?