Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/action_dipatch/routing/mapper.rb
Instance Method Summary collapse
-
#draw_routes ⇒ Object
def draw(routes_name) instance_eval(File.read(Rails.root.join(“config/routes/#routes_name.rb”))) end.
Instance Method Details
#draw_routes ⇒ Object
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
6 7 8 9 10 |
# File 'lib/action_dipatch/routing/mapper.rb', line 6 def draw_routes Dir.glob("#{Rails.root}/config/routes/**/*.rb").each do |route| instance_eval(File.read(route)) end end |