Make array unique once instead of twice. Use each instead of map when the result is ignored. Use a dataset update with CURRENT_TIMESTAMP instead of a model update with Time.now.
Make array unique once instead of twice. Use each instead of map when the result is ignored. Use a dataset update with CURRENT_TIMESTAMP instead of a model update with Time.now.