Skip to content

Status

Displays the status of a record in three ways; loading, failed, or success.

You may select the loading and the failed state values, and it will fall back to success.

ruby
field :progress,
  as: :status,
  failed_when: [:closed, :rejected, :failed],
  loading_when: [:loading, :running, :waiting, "in progress"]
Status field

Options

failed_when

Set the values for when the status is failed.

Default value

[:failed]

Possible values

[:closed, :rejected, :failed] or an array with strings or symbols that indicate the failed state.

loading_when

Set the values for when the status is loading.

Default value

[:waiting, :running]

Possible values

[:loading, :running, :waiting, "in progress"] or an array with strings or symbols that indicate the loading state.