Sha256: 9e6dba7d9da2ddbc6a919c5707efa054c561c3be78e8cbf3dffc6a2ab8e20ccd

Contents?: true

Size: 487 Bytes

Versions: 28

Compression:

Stored size: 487 Bytes

Contents

module AbstractController
  module Railties
    module RoutesHelpers
      def self.with(routes)
        Module.new do
          define_method(:inherited) do |klass|
            super(klass)
            if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) }
              klass.send(:include, namespace._railtie.routes.url_helpers)
            else
              klass.send(:include, routes.url_helpers)
            end
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
actionpack-3.1.12 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.11 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.10 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.9 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.8 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.7 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.6 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.5 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.5.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.4 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.4.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.2.rc2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.2.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.1.rc3 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.1.rc2 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.1.rc1 lib/abstract_controller/railties/routes_helpers.rb
actionpack-3.1.0 lib/abstract_controller/railties/routes_helpers.rb