You can test for the environment by the if statement:
if Rails.env.development?
#what you want in development
end
You can put an else statement for other environment types.
This is similar to this question: Changing a Rails route based on deployment type