Module: Oasis::RouteSet

Included in:
ActionController::Routing::RouteSet::Mapper
Defined in:
lib/oasis/routes.rb

Overview

this gets mixed into the standard ActionController RouteSet Mapper and provides the API to the mapper.

Instance Method Summary collapse

Instance Method Details

#routing_for(name, *args) ⇒ Object

Raises:

  • (ActionController::RoutingError)


20
21
22
23
24
25
# File 'lib/oasis/routes.rb', line 20

def routing_for(name,*args)
  raise ActionController::RoutingError, "#{name} routing collection has already been used once." if Oasis::Routes.apps[name] == false
  raise ActionController::RoutingError, "app: #{name} not registered" unless Oasis::Routes.apps[name]
  with_options(args.extract_options!, &Oasis::Routes.apps[name])
  Oasis::Routes.apps[name] = false
end