abstract class ActionController::Base
- ActionController::Base
- Reference
- Object
Included Modules
- ActionController::Context
- ActionController::Responders
Defined in:
spec/curl_context.craction-controller/base.cr
Constant Summary
-
AFTER_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
AROUND_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
BEFORE_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
CONCRETE_CONTROLLERS =
{} of Nil => Nil
-
Base route => klass name
-
CRUD_METHODS =
{"index" => {"get", "/", false}, "new" => {"get", "/new", false}, "create" => {"post", "/", false}, "show" => {"get", "/:id", true}, "edit" => {"get", "/:id/edit", true}, "update" => {"patch", "/:id", true}, "replace" => {"put", "/:id", true}, "destroy" => {"delete", "/:id", true}}
-
DEFAULT_PARAM_ID =
{} of Nil => Nil
-
Route IDs params
-
FILTER_TYPES =
["ROUTES", "BEFORE", "AROUND", "AFTER", "RESCUE", "FORCE", "SKIP"] of ::String
-
FORCE_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
RESCUE_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
ROUTES_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
SKIP_MAPPINGS =
{} of Nil => Nil
-
klass => {function => options}
-
TEMPLATE_LAYOUT =
{} of Nil => Nil
-
Template support
-
TEMPLATE_PATH =
{ActionController::Base => "./src/views/"} of Nil => Nil
Constructors
Class Method Summary
-
.__init_routes__(router)
To support inheritance
- .__route_list__
- .__yield__(inst, &)
-
.extract_params(context : HTTP::Server::Context) : URI::Params
Extracts query and route params into a single
URI::Params
instance
Instance Method Summary
- #__cookies__ : HTTP::Cookies | Nil
- #__session__ : Session | Nil
- #action_name : Symbol
- #client_ip : String
- #context : HTTP::Server::Context
- #cookies : HTTP::Cookies
- #files : Hash(String, Array(ActionController::BodyParser::FileUpload)) | Nil
- #form_data
- #params : URI::Params
- #query_params(*args, **options)
- #query_params(*args, **options, &)
- #render_called : Bool
- #request(*args, **options)
- #request(*args, **options, &)
- #request_content_type : String | Nil
-
#request_protocol
=============== Helper methods: ===============
- #response(*args, **options)
- #response(*args, **options, &)
- #route_params(*args, **options)
- #route_params(*args, **options, &)
- #session : Session
Macro Summary
- __build_filter_inheritance_macros__
- __build_filter_mappings__
- __create_route_methods__
- __draw_routes__
- after_action(method, only = nil, except = nil)
- around_action(method, only = nil, except = nil)
- base(name = nil)
- before_action(method, only = nil, except = nil)
- delete(path, name = nil, annotations = nil, &block)
- force_ssl(only = nil, except = nil)
- force_tls(only = nil, except = nil)
- get(path, name = nil, annotations = nil, &block)
- id_param(id)
- layout(filename = nil)
- options(path, name = nil, annotations = nil, &block)
- partial(partial, io = nil)
- patch(path, name = nil, annotations = nil, &block)
- post(path, name = nil, annotations = nil, &block)
- put(path, name = nil, annotations = nil, &block)
- rescue_from(error_class, method = nil, &block)
- skip_action(method, only = nil, except = nil)
- template(template = nil, partial = nil, layout = nil, io = nil)
- template_path(path)
- ws(path, name = nil, annotations = nil, &block)
Instance methods inherited from module ActionController::Responders
accepts_formats
accepts_formats
Constructor Detail
def self.new(context : HTTP::Server::Context, action_name : Symbol = :index, __head_request__ : Bool = false)
#
Class Method Detail
def self.extract_params(context : HTTP::Server::Context) : URI::Params
#
Extracts query and route params into a single URI::Params
instance