Status ​
Displays the status of a record in three ways; loading
, failed
, success
, or neutral
.
You may select the loading
, failed
, and success
state values, and everything else will fall back to neutral
.
ruby
field :progress,
as: :status,
failed_when: [:closed, :rejected, :failed],
loading_when: [:loading, :running, :waiting, "in progress"],
success_when: [:done],

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.