Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 840 Bytes

File metadata and controls

46 lines (33 loc) · 840 Bytes

administrate-field-enumerate

A plugin to show enumerate_it attributes in Administrate.

Installation

Add to Gemfile:

gem 'administrate-field-enumerate'

In your terminal execute:

$ bundle install

Usage example

# app/enumerations/role_type.rb
class RoleType < EnumerateIt::Base
  associate_values(
    :contributor,
    :editor,
    :admin,
    :super_admin 
  )
end

# app/dashboards/user_dashboard.rb
ATTRIBUTE_TYPES = {
  ...
  role: Field::Enumerate
  ...
}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/SourceLabsLLC/administrate-field-enumerate

License

MIT License