abstract class Orma::Record

Defined in:

lib/orma/src/orma/record.cr
lib/orma/src/orma/record/from_http_params.cr
orma/orma.cr

Macro Summary

Macro Detail

macro boolean_flip_action(name, attr, tpl, &blk) #

[View source]
macro create_child_action(name, child_class, parent_id_attr, tpl, &blk) #

[View source]
macro delete_record_action(name, tpl, &blk) #

Defines an action to delete the record from the database. Parameters:

  • name - the name of the action
  • tpl - 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

[View source]
macro model_action(name, refreshed_model_template, base_class = Orma::ModelAction, &blk) #

[View source]
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 action
  • assoc - method of the parent model returning the children collection
  • child_view - method of the child model returning the template to use in the sortable list
  • tpl - the model template to render in the response

[View source]