Use Rails.env for environment checking instead