Skip to content

abstract class ActionController::Base
inherits Reference #

Included modules

ActionController::Responders ActionController::Route::Builder

Constants#

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#

.new(context : HTTP::Server::Context, action_name = :index, __head_request__ = false)#

View source

Class methods#

.__init_routes__(router)#

To support inheritance

View source

.__route_list__#

View source

.__yield__#

View source

.extract_params(context : HTTP::Server::Context) : URI::Params#

Extracts query and route params into a single URI::Params instance

View source

Methods#

#__cookies__ : HTTP::Cookies | ::Nil#

View source

#__session__ : Session | ::Nil#

View source

#action_name : Symbol#

View source

#client_ip : String#

View source

#context#

View source

#cookies : HTTP::Cookies#

View source

#files : Hash(String, Array(ActionController::BodyParser::FileUpload)) | ::Nil#

View source

#form_data#

View source

#params : URI::Params#

View source

#query_params(*args, **options)#

View source

#query_params#

View source

#render_called : Bool#

View source

#request(*args, **options)#

View source

#request#

View source

#request_content_type : String | ::Nil#

View source

#request_protocol#

=============== Helper methods: ===============

View source

#response(*args, **options)#

View source

#response#

View source

#route_params(*args, **options)#

View source

#route_params#

View source

#session : Session#

View source

Macros#

__build_filter_inheritance_macros__#

View source

__build_filter_mappings__#

View source

__create_route_methods__#

View source

__define_filter_macro__(name, store, method = nil)#

View source

__draw_routes__#

View source

after_action(method, only = nil, except = nil)#

View source

around_action(method, only = nil, except = nil)#

View source

base(name = nil)#

View source

before_action(method, only = nil, except = nil)#

View source

delete(path, function = nil, annotations = nil, reference = nil#

View source

force_ssl(only = nil, except = nil)#

View source

force_tls(only = nil, except = nil)#

View source

get(path, function = nil, annotations = nil, reference = nil#

View source

id_param(id)#

View source

layout(filename = nil)#

View source

options(path, function = nil, annotations = nil, reference = nil#

View source

partial(partial, io = nil)#

View source

patch(path, function = nil, annotations = nil, reference = nil#

View source

post(path, function = nil, annotations = nil, reference = nil#

View source

put(path, function = nil, annotations = nil, reference = nil#

View source

rescue_from(error_class, method = nil#

View source

skip_action(method, only = nil, except = nil)#

View source

template(template = nil, partial = nil, layout = nil, io = nil)#

View source

template_path(path)#

View source

ws(path, function = nil, annotations = nil, reference = nil#

View source