# app/avo/actions/toggle_inactive.rb
class Avo::Actions::ToggleInactive < Avo::BaseAction
  self.name = "Toggle Inactive"
  # self.visible = -> do
  #   true
  # end

  # def fields
  #   # Add Action fields here
  # end

  def handle(query:, fields:, current_user:, resource:, **args)
    query.each do |record|
      # Do something with your records.
    end
  end
end
```

## Generator Options

### `--standalone`

By default, actions require at least one record to be selected before they can be triggered, unless specifically configured as standalone actions.

The `--standalone` option creates an action that doesn't require record selection. This is particularly useful for:
- Generating reports
- Exporting all records
- Running global operations

```bash
bin/rails generate avo:action export_users --standalone
```

You can also make an existing action standalone by manually setting `self.standalone = true` in the action class:

```ruby{5}