method
eval_block
v3.2.8 -
Show latest stable
- Class:
ActionDispatch::Routing::RouteSet
eval_block(block)public
No documentation available.
# File actionpack/lib/action_dispatch/routing/route_set.rb, line 273
def eval_block(block)
if block.arity == 1
raise "You are using the old router DSL which has been removed in Rails 3.1. " <<
"Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/"
end
mapper = Mapper.new(self)
if default_scope
mapper.with_default_scope(default_scope, &block)
else
mapper.instance_exec(&block)
end
end