Refactoring edit action in activation_keys controller