abstract class
Orma::Record
- Orma::Record
- Reference
- Object
Defined in:
lib/orma/src/orma/record.crlib/orma/src/orma/record/from_http_params.cr
orma/orma.cr
Macro Summary
- boolean_flip_action(name, attr, tpl, &blk)
- create_child_action(name, child_class, parent_id_attr, tpl, &blk)
-
delete_record_action(name, tpl, &blk)
Defines an action to delete the record from the database.
- model_action(name, refreshed_model_template, base_class = Orma::ModelAction, &blk)
-
reorder_children_action(name, assoc, child_view, tpl, &blk)
Defines an action to make a list of child models sortable via dragging.
Macro Detail
macro delete_record_action(name, tpl, &blk)
#
Defines an action to delete the record from the database. Parameters:
name
- the name of the actiontpl
- the model template to render in the response Possible customizations:def self.confirm_prompt(model)
- String message to be used as the prompt for a JavaScript confirm dialog
macro reorder_children_action(name, assoc, child_view, tpl, &blk)
#
Defines an action to make a list of child models sortable via dragging. Parameters:
name
- the name of the actionassoc
- method of the parent model returning the children collectionchild_view
- method of the child model returning the template to use in the sortable listtpl
- the model template to render in the response