Skip to content

apsislabs/administrate-field-acts_as_taggable

Repository files navigation

Administrate::Field::ActsAsTaggable

An Administrate field for supporting ActsAsTaggableOn.

Usage

Add this line to your application's Gemfile:

gem 'administrate-field-acts_as_taggable'

Then, in your dashboard, configure your ActsAsTaggable attribute with Field::ActsAsTaggable:

# models/post.rb
class Post < ActiveRecord::Base
  acts_as_taggable_on :categories
end

# dashboards/post_dashboard.rb
class PostDashboard < Administrate::BaseDashboard
  # ATTRIBUTE_TYPES
  ATTRIBUTE_TYPES = {
    name: Field::String,
    content: Field::Text,
    categories: Field::ActsAsTaggable
  }.freeze
end

Development

Tests

Run rspec to run the tests.

Documentation

To generate documentation run yard. To view undocumented files run yard stats --list-undoc.

Contributing

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

License

The gem is available as open source under the terms of the MIT License.


Built by Apsis

apsis

Administrate::Field::ActsAsTaggable was built by Apsis Labs. We love sharing what we build! Check out our other libraries on Github, and if you like our work you can hire us to build your vision.

About

An Administrate field for managing ActsAsTaggableOn fields

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •