Oh and another problem (and this is my fault for suggesting the above in the first place) is that @deployment.name is already cleared at this point based on that same condition (i.e. beginning with NEW_NAME_PREFIX) in the controller, so the correct check here is just .empty?