class TodosController
- TodosController
- Application
- ActionController::Base
- Reference
- Object
Defined in:
controllers/todos_controller.crConstant Summary
-
AFTER =
{} of Nil => Nil
-
AROUND =
{} of Nil => Nil
-
BEFORE =
{set_request_id => {nil, nil}, set_date_header => {nil, nil}, set_cors => {nil, nil}} of Nil => Nil
-
FORCE =
{} of Nil => Nil
-
LOCAL_AFTER =
{} of Nil => Nil
-
function => options
-
LOCAL_AROUND =
{} of Nil => Nil
-
function => options
-
LOCAL_BEFORE =
{} of Nil => Nil
-
function => options
-
LOCAL_FORCE =
{} of Nil => Nil
-
function => options
-
LOCAL_RESCUE =
{} of Nil => Nil
-
function => options
-
LOCAL_ROUTES =
{delete_ => {"delete", "/", do Todo.query.each do |todo| todo.delete end end, false}, options_ => {"options", "/", do response.headers["Access-Control-Allow-Methods"] = "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS" end, false}, options__id => {"options", "/:id", do response.headers["Access-Control-Allow-Methods"] = "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS" end, false}} of Nil => Nil
-
function => options
-
LOCAL_SKIP =
{} of Nil => Nil
-
function => options
-
NAMESPACE =
["/todos"]
-
default namespace based on class
-
RESCUE =
{} of Nil => Nil
-
ROUTES =
{delete_ => {"delete", "/", do Todo.query.each do |todo| todo.delete end end, false}, options_ => {"options", "/", do response.headers["Access-Control-Allow-Methods"] = "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS" end, false}, options__id => {"options", "/:id", do response.headers["Access-Control-Allow-Methods"] = "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS" end, false}, index => {"get", "/", nil, false}, create => {"post", "/", nil, false}, show => {"get", "/:id", nil, false}, update => {"patch", "/:id", nil, false}, destroy => {"delete", "/:id", nil, false}} of Nil => Nil
-
SKIP =
{} of Nil => Nil
Class Method Summary
-
.__init_routes__(router)
Routes call the functions generated above
-
.__route_list__
Create draw_routes function
-
.base_route
Helper for obtaining base route
- .context(method : String, route : String, route_params : Hash(String, String) | Nil = nil, headers : Hash(String, String) | Nil = nil, body : String | Bytes | IO | Nil = nil, &)
-
.create(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.delete_(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Helper methods for performing redirect_to calls
-
.delete__todos_(context, head_request)
Generate functions for each route
-
.delete__todos__id(context, head_request)
Create draw_routes function
-
.destroy(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.get__todos_(context, head_request)
Create draw_routes function
-
.get__todos__id(context, head_request)
Create draw_routes function
-
.index(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.options_(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.options__id(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.options__todos_(context, head_request)
Create draw_routes function
-
.options__todos__id(context, head_request)
Create draw_routes function
-
.patch__todos__id(context, head_request)
Create draw_routes function
-
.post__todos_(context, head_request)
Create draw_routes function
-
.show(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.update(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
Instance Method Summary
-
#base_route : String
Helper for obtaining base route
-
#create
POST /todos/
-
#delete_
Create functions for named routes Skip the CRUD
-
#destroy
DELETE /todos/:id
-
#index
GET /todos
-
#options_
Skip the CRUD
-
#options__id
Skip the CRUD
-
#show
GET /todos/:id
- #todo : Todo
-
#update
PATCH/PUT /todos/:id
Macro Summary
- __inherit_after_filters__
- __inherit_around_filters__
- __inherit_before_filters__
- __inherit_force_filters__
- __inherit_rescue_filters__
- __inherit_routes_filters__
- __inherit_skip_filters__
Instance methods inherited from class Application
set_cors
set_cors,
set_date_header
set_date_header,
set_request_id
set_request_id
Class methods inherited from class Application
context(method : String, route : String, route_params : Hash(String, String) | Nil = nil, headers : Hash(String, String) | Nil = nil, body : String | Bytes | IO | Nil = nil, &)
context
Class Method Detail
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Helper methods for performing redirect_to calls
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers