show do
attributes_table do
state_row :state
end
end
index do
state_column :state
end
The name of the state will be the class name (rejected, approved, etc.), but you can pass a hash of options to map different states with tag colors.
state_column(:state, states: { destroyed: "rejected" })
You will need to define inside your_app/app/assets/stylesheets/active_admin.css.scss
the following:
.status_tag {
&.rejected { background: $rejected-color; }
&.approved { background: $approved-color; }
}