added if statement to production.rb