class ActiveAdmin::Views::StatusTag
def build(*args)
-
(ActiveAdmin::Views::StatusTag)
-
Parameters:
-
options
(Hash
) -- such as :class, :id etc -
type
(Symbol
) -- type of status. Will become a class of the span. ActiveAdmin provide style for :ok, :warning and :error. -
status
(String
) -- the status to display. One of the span classes will be an underscored version of the status.
def build(*args) options = args.extract_options! status = args[0] type = args[1] classes = options.delete(:class) status = status.titleize if status super(status, options) add_class(status_to_class(status)) if status add_class(type.to_s) if type add_class(classes) if classes end