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"]
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.
Friendly.rb - Your friendly European Ruby Conference