def namespace(name_or_path, opts = {}, &block)
name = name_or_path.to_s
path = opts.has_key?(:path) ? opts[:path] : name
raise Error, "The route has already been committed. Further options cannot be specified" if @route
opts[:controller_prefix] = name unless opts.has_key?(:controller_prefix)
opts[:name_prefix] = name unless opts.has_key?(:name_prefix)
opts[:resource_prefix] = opts[:name_prefix] unless opts.has_key?(:resource_prefix)
behavior = self
behavior = behavior.match("/#{path}") unless path.nil? || path.empty?
behavior.options(opts, &block)
end