1 2 3 4 5 6 7 8 9 10 11 12 13 14
module ActionController module Railties module UrlHelpers def self.with(routes) Module.new do define_method(:inherited) do |klass| super(klass) klass.send(:include, routes.url_helpers) end end end end end end