Sha256: f08d9ee3001671f52c09254b9dd36e9699650493031b953d28581808c6987d1c

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

# Administrate::Field::CollectionSelect

A plugin for [Administrate](https://github.com/thoughtbot/administrate)

## Usage

Add to your `Gemfile`:

```ruby
gem 'administrate-field-collection_select'
```

Run:

```bash
$ bundle install
```

Add to your `FooDashboard`:

Supports all of the options that a normal Rails collection_select does including `multiple: true`

**NOTE:** Make sure to specify the collection query as a `proc`
```ruby
ATTRIBUTE_TYPES = [
  bars: Field::CollectionSelect.with_options(
    collection: proc { Bar.all },
    value_method: :id,
    text_method: :name,
    options: {
      include_blank: 'Please Select A/Some Bars',
      include_hidden: false,
    },
    multiple: true,
    label: 'Good Bars',
  ),
]
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
administrate-field-collection_select-0.4.0 README.md