trabajo-afectivo/lib/sequencer/unit/import/common/user/attributes/downcase.rb

30 lines
685 B
Ruby
Raw Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Sequencer
class Unit
module Import
module Common
module User
module Attributes
class Downcase < Sequencer::Unit::Base
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_action :skipped, :failed
uses :mapped
def process
2017-11-23 08:09:44 +00:00
%i[login email].each do |attribute|
next if mapped[attribute].blank?
mapped[attribute].downcase!
end
end
end
end
end
end
end
end
end