class ActiveAdmin::Views::StatusTag
def build(status, options = {})
-
(ActiveAdmin::Views::StatusTag)
-
Options Hash:
(**options)
-
:label
(String
) -- to override the default label -
:id
(String
) -- to override the default id -
:class
(String
) -- to override the default class
Parameters:
-
options
(Hash
) -- -
status
(String
) -- the status to display. One of the span classes will be an underscored version of the status.
Overloads:
-
status_tag(status, options = {})
def build(status, options = {}) label = options.delete(:label) classes = options.delete(:class) status = convert_to_boolean_status(status) if status content = label || if s = status.to_s and s.present? I18n.t "active_admin.status_tag.#{s.downcase}", default: s.titleize end end super(content, options) add_class(status_to_class(status)) if status add_class(classes) if classes end