Module: Snails::RouteTable
- Defined in:
- runtime/snails/route_dsl.rbs,
runtime/snails/route_dsl.rb
Class Method Summary collapse
-
.delete(path, controller, action = :destroy) ⇒ ActionDispatch::Router::Route
a DELETE row, defaulting to the destruction action.
-
.get(path, controller, action = :index) ⇒ ActionDispatch::Router::Route
a GET row, defaulting to the collection action.
-
.post(path, controller, action = :create) ⇒ ActionDispatch::Router::Route
a POST row, defaulting to the creation action.
-
.put(path, controller, action = :update) ⇒ ActionDispatch::Router::Route
a PUT row, defaulting to the update action.
-
.resources(path, controller, format = nil, only = nil) ⇒ Array<ActionDispatch::Router::Route>
the five RESTful rows of a resource as
Array[Route]: index/create on the collection path, show/update/destroy onpath/:id, collection rows before member rows.
Class Method Details
.delete(path, controller, action = :destroy) ⇒ ActionDispatch::Router::Route
a DELETE row, defaulting to the destruction action.
62 |
# File 'runtime/snails/route_dsl.rb', line 62
def self.delete: (String path, Class controller, ?Symbol action) -> ActionDispatch::Router::Route
|
.get(path, controller, action = :index) ⇒ ActionDispatch::Router::Route
a GET row, defaulting to the collection action.
26 |
# File 'runtime/snails/route_dsl.rb', line 26
def self.get: (String path, Class controller, ?Symbol action) -> ActionDispatch::Router::Route
|
.post(path, controller, action = :create) ⇒ ActionDispatch::Router::Route
a POST row, defaulting to the creation action.
38 |
# File 'runtime/snails/route_dsl.rb', line 38
def self.post: (String path, Class controller, ?Symbol action) -> ActionDispatch::Router::Route
|
.put(path, controller, action = :update) ⇒ ActionDispatch::Router::Route
a PUT row, defaulting to the update action.
50 |
# File 'runtime/snails/route_dsl.rb', line 50
def self.put: (String path, Class controller, ?Symbol action) -> ActionDispatch::Router::Route
|
.resources(path, controller, format = nil, only = nil) ⇒ Array<ActionDispatch::Router::Route>
the five RESTful rows of a resource as Array[Route]: index/create on the
collection path, show/update/destroy on path/:id, collection rows before
member rows. The caller concatenates the result into its table;
first-match order is preserved exactly as declared.
87 |
# File 'runtime/snails/route_dsl.rb', line 87
def self.resources: (String path, Class controller, ?Symbol? format, ?Array[Symbol]? only) -> Array[ActionDispatch::Router::Route]
|