module CmAdmin::Models::DslMethod

def row(display_if: nil, html_attrs: nil, &block)

Other tags:
    Example: Creating a row -

Parameters:
  • html_attrs (Hash) -- A hash that contains html attributes
  • display_if (Proc) -- A lambda that takes the current object and return true or false
def row(display_if: nil, html_attrs: nil, &block)
  @available_fields[@current_action.name.to_sym] ||= []
  @available_fields[@current_action.name.to_sym] << CmAdmin::Models::Row.new(@current_action, @model, display_if, html_attrs, &block)
end