Method: Grape::DSL::Routing::ClassMethods#scope

Defined in:
lib/grape/dsl/routing.rb

#scope(_name = nil, &block) ⇒ Object

Create a scope without affecting the URL.

make the code more readable.

Parameters:

  • _name (Symbol) (defaults to: nil)

    Purely placebo, just allows to name the scope to



66
67
68
69
70
# File 'lib/grape/dsl/routing.rb', line 66

def scope(_name = nil, &block)
  within_namespace do
    nest(block)
  end
end