blob: 3e6f211cdaa7e316b0878d384235a734ea4d17bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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
module MountedHelpers
def self.with(routes, name = nil)
Module.new do
define_method(:inherited) do |klass|
super(klass)
klass.send(:include, routes.mounted_helpers(name))
end
end
end
end
end
end
|