0.0
No commit activity in last 3 years
No release in over 3 years
Tags for the Godmin admin engine for Rails 4+
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

> 1.7
> 10.0

Runtime

< 3.0, >= 0.9.7
 Project Readme

Godmin Tags

Gem Version

Godmin Tags is a tags component for Godmin that adds an f.tags_field to forms.

Installation

Add the gem to the application's Gemfile:

gem "godmin-tags"

Or to the admin engine's gemspec:

s.add_dependency "godmin-tags", "~> x.x.x"

Usage

Use the tags field in your form like so:

<%= form_for(@resource) do |f| %>
  <%= f.text_field :title %>
  <%= f.text_area :body %>

  <%= f.tags_field :tags, data: { collection: Tag.all.pluck(:name) } %>
<% end %>

Or initialize yourself using JavaScript:

Godmin.Tags.initializeTagger($el);

Additional options can be passed down to Godmin.SelectBoxes:

Godmin.Tags.initializeTagger($el, {
  create: false
});

Contributors

https://github.com/varvet/godmin-tags/graphs/contributors

License

Licensed under the MIT license. See the separate MIT-LICENSE file.