module

Rolify

Class methods

build_query(role_table : String, role : String, resource : ResourceRef) : String

build_query: OR-chain matching global / class-scoped / instance- scoped roles, fully inlined.

dynamic_shortcuts

Rolify.configure equivalents. dynamic_shortcuts has no Crystal equivalent (runtime method definition) and is kept for parity only.

dynamic_shortcuts=(dynamic_shortcuts : Bool)

Rolify.configure equivalents. dynamic_shortcuts has no Crystal equivalent (runtime method definition) and is kept for parity only.

in_clause(values : Array(String)) : String
lit(v : String | Int64) : String

SQL string literal ('..' with escaped quotes) — where() here takes no bound args for Array inputs, so builders inline everything.

remove_role_if_empty
remove_role_if_empty=(remove_role_if_empty : Bool)
resource_id_of(resource) : Int64 | Nil
resource_type_of(resource) : String
resource_types_for(klass : ActiveRecord::Base.class) : Array(String)

resource_types_for: the class name (STI descendants are not walkable at runtime in Crystal — documented deviation; oracle cases have no STI resources).

strict_query(role_table : String, role : String, resource : ResourceRef) : String

where_strict: exact resource match (no OR chain).

Nested types