class Orion::Controller::ParamHelpers::ParamsHash

Overview

Strong parameters support

Defined in:

orion/controller/param_helpers.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(context : Orion::Server::Context) #

[View source]

Instance Method Detail

def [](key : String | Symbol) : String #

Get parameter value


[View source]
def []?(key : String | Symbol) : String | Nil #

[View source]
def get(key : String | Symbol, type : T.class) : T forall T #

Get parameter as specific type


[View source]
def has_key?(key : String | Symbol) : Bool #

Check if parameter exists


[View source]
def keys : Array(String) #

Get all parameter keys


[View source]
def permit(*keys : String | Symbol) : Hash(String, String) #

Strong parameters - permit specific keys


[View source]
def require(key : String | Symbol) : StrongParams #

Strong parameters - require specific key


[View source]
def to_h : Hash(String, String) #

Convert to hash


[View source]