Explore using Rails.env.local? which returns true if the environment is development or test.