class PluginRoutes
- PluginRoutes
- Application
- ActionController::Base
- Reference
- Object
Overview
Implementation of a TODO application
Defined in:
controllers/plugin_routes.crConstant Summary
-
PARSER_LIST =
["application/json"]
-
Implementation of a TODO application
-
RESPONDER_LIST =
["application/json"]
-
Implementation of a TODO application
-
TODOS =
[] of Todo
Class Method Summary
-
.base_route
Helper for obtaining base route
-
.index(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Helper methods for performing redirect_to calls
Instance Method Summary
-
#base_route(*args, **options)
Helper for obtaining base route
-
#base_route(*args, **options, &)
Helper for obtaining base route
-
#complete(index : Int32) : Nil
mark the todo, at the index provided, as completed
-
#create(todo : Todo) : Todo
append a new todo to the end of the list
-
#index : Array(Todo)
returns the list of todos
-
#show(index : Int32) : Todo
return the todo at the index provided, indexes start at 0
-
#update(index : Int32, todo : Todo) : Todo
modify the todo at the index provided
Instance methods inherited from class Application
bad_media_type(error) : AC::Error::ContentResponse
bad_media_type,
invalid_param(error) : AC::Error::ParameterResponse
invalid_param,
resource_not_found(error) : AC::Error::CommonResponse
resource_not_found,
set_cors_headers
set_cors_headers,
set_request_id
set_request_id
Class Method Detail
def self.index(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
#
Helper methods for performing redirect_to calls
Instance Method Detail
def complete(index : Int32) : Nil
#
mark the todo, at the index provided, as completed
indexes start at 0
return the todo at the index provided, indexes start at 0
modify the todo at the index provided
indexes start at 0 and this will also set completed to false