abstract class Lucky::Action

Included Modules

Defined in:

lucky/action.cr

Constant Summary

AFTER_PIPES = [] of Symbol
BEFORE_PIPES = [set_turbolinks_location_header_from_session, verify_accepted_format] of Symbol
EXPOSURES = [] of Symbol
PARAM_DECLARATIONS = [] of Crystal::Macros::TypeDeclaration
ROUTE_SETTINGS = {prefix: ""}
SKIPPED_PIPES = [] of Symbol

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Lucky::VerifyAcceptsFormat

clients_desired_format : Symbol clients_desired_format

Instance methods inherited from module Lucky::RedirectableTurbolinksSupport

redirect(to path : String, status : Int32 = 302) : Lucky::TextResponse redirect

Instance methods inherited from module Lucky::Redirectable

redirect(to route : Lucky::RouteHelper, status = 302) : Lucky::TextResponse
redirect(to action : Lucky::Action.class, status = 302) : Lucky::TextResponse
redirect(to path : String, status : HTTP::Status) : Lucky::TextResponse
redirect(to path : String, status : Int32 = 302) : Lucky::TextResponse
redirect
, redirect_back(*, fallback : Lucky::Action.class, status = 302, allow_external = false)
redirect_back(*, fallback : Lucky::RouteHelper, status = 302, allow_external = false)
redirect_back(*, fallback : String, status : HTTP::Status, allow_external = false)
redirect_back(*, fallback : String, status : Int32 = 302, allow_external : Bool = false)
redirect_back

Instance methods inherited from module Lucky::ActionPipes

continue : Lucky::ActionPipes::Continue continue

Instance methods inherited from module Lucky::ParamHelpers

params : Lucky::Params params, params__tuple_cached : Tuple(Lucky::Params) params__tuple_cached, params__uncached : Lucky::Params params__uncached

Instance methods inherited from module Lucky::Renderable

component(comp : Lucky::BaseComponent.class, status : Int32 | Nil = nil, **named_args) : Lucky::TextResponse
component(comp : Lucky::BaseComponent.class, status : HTTP::Status, **named_args) : Lucky::TextResponse
component
, data(data : String, content_type : String = "application/octet-stream", disposition : String = "attachment", filename : String | Nil = nil, status : Int32 | Nil = nil) : Lucky::DataResponse data, file(path : String, content_type : String | Nil = nil, disposition : String = "attachment", filename : String | Nil = nil, status : Int32 | Nil = nil) : Lucky::FileResponse
file(path : String, content_type : String | Nil = nil, disposition : String = "attachment", filename : String | Nil = nil, status : HTTP::Status = HTTP::Status::OK) : Lucky::FileResponse
file
, head(status : Int32) : Lucky::TextResponse
head(status : HTTP::Status) : Lucky::TextResponse
head
, json(body, status : Int32 | Nil = nil) : Lucky::TextResponse
json(body, status : HTTP::Status) : Lucky::TextResponse
json
, plain_text(body : String, status : Int32 | Nil = nil) : Lucky::TextResponse
plain_text(body : String, status : HTTP::Status) : Lucky::TextResponse
plain_text
, raw_json(body : String, status : Int32 | Nil = nil) : Lucky::TextResponse
raw_json(body : String, status : HTTP::Status) : Lucky::TextResponse
raw_json
, send_text_response(body : String, content_type : String, status : Int32 | Nil = nil) : Lucky::TextResponse send_text_response, xml(body : String, status : Int32 | Nil = nil) : Lucky::TextResponse
xml(body, status : HTTP::Status) : Lucky::TextResponse
xml

Instance methods inherited from module Lucky::RequestTypeHelpers

accepts?(format : Symbol) : Bool accepts?, ajax? : Bool ajax?, html? : Bool html?, json? : Bool json?, multipart? : Bool multipart?, plain_text? : Bool plain_text?, xml? : Bool xml?

Constructor Detail

def self.new(context : HTTP::Server::Context, route_params : Hash(String, String)) #

[View source]

Class Method Detail

def self._accepted_formats #

[View source]
def self.query_param_declarations : Array(String) #

Instance Method Detail

abstract def call #

[View source]
def context : HTTP::Server::Context #

[View source]
def cookies(*args, **options) #

def cookies(*args, **options, &) #

def flash(*args, **options) #

def flash(*args, **options, &) #

def request(*args, **options) #

def request(*args, **options, &) #

def response(*args, **options) #

def response(*args, **options, &) #

def route_params : Hash(String, String) #

[View source]
def session(*args, **options) #

def session(*args, **options, &) #