Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/action_dipatch/routing/mapper.rb

Instance Method Summary collapse

Instance Method Details

#draw_routesObject

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