app/controllers/users_controller.rb
# we should allow logged in users to update their pending_organisation_id
# and only superadmins should be allowed to update organisation_id
# makes me think of a attributes permissions matrix
we should allow logged in users to update their pending_organisation_id
and only superadmins should be allowed to update organisation_id
makes me think of a attributes permissions matrix
we should allow logged in users to update their pending_organisation_id and only superadmins should be allowed to update organisation_id makes me think of a attributes permissions matrix
def update
    org = Organisation.friendly.find(params[:pending_organisation_id])
    usr = User.find_by_id UserParams.build(params).fetch(:id)
    UserOrganisationClaimer.new(self, usr, usr).call(org.id)
  end
def update org = Organisation . friendly . find ( params [ :pending_organisation_id ] ) usr = User . find_by_id UserParams . build ( params ) . fetch ( :id ) UserOrganisationClaimer . new ( self , usr , usr ) . call ( org . id ) end
we should allow logged in users to update their pending_organisation_id
and only superadmins should be allowed to update organisation_id
makes me think of a attributes permissions matrix
we should allow logged in users to update their pending_organisation_id and only superadmins should be allowed to update organisation_id makes me think of a attributes permissions matrix