yes, I'll change this, it was supposed to be 
params['host']['environment_id'].present? || params['host']['hostgroup_id'].present?