title: Require file only if it exists
body: <p>Perhaps there's a better way to do this. I want to be able to load some routes dynamically. I was planning on having static routes in <code>routes.rb</code>, and custom routes in <code>custom_routes.rb</code>. Then at the bottom of <code>routes.rb</code>, I would do:</p>
  
  <pre><code>CustomRoutes.create if defined?(CustomRoutes)
  </code></pre>
  
  <p>In order for this to work I have to require <code>custom_routes.rb</code> only if the file exists, but how?</p>
  
  <p><strong>custom_routes.rb</strong></p>
  
  <pre><code>class CustomRoutes
    def self.create
      MyApplication.routes.draw do
        #...more routes here
      end
    end
  end
  </code></pre>