Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Gutentag for tags #1364

Merged
merged 3 commits into from
Feb 28, 2018
Merged

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Feb 26, 2018

Gutentag is a small but capable library for managing tags in activerecord models.

ActsAsTaggableOn is full of features we don't use and not very well maintained.

It also lacks support for Rails 5.2

# Returns all unique tags
def tag_counts
Gutentag::Tag.distinct.joins(:taggings)
.where(gutentag_taggings: {taggable_type: self.name})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant self detected.

@tvdeyen tvdeyen force-pushed the migrate-to-gutentag branch 2 times, most recently from 776868b to 9fa456b Compare February 27, 2018 09:31
This module handles all tag related stuff for our models.
@tvdeyen tvdeyen force-pushed the migrate-to-gutentag branch from 9fa456b to 5a46220 Compare February 27, 2018 13:40
Gutentag is a small but capable library for managing tags in activerecord models.
ActsAsTaggableOn is full of features we don't use and not very well maintained lately.
It also lacks support for Rails 5.2
Since the acts-as-taggable-on migrations make use of the ActsAsTaggableOn class, we want to skip the tasks inside of these migrations. We renamed the tables anyway, but in order to be able to re-run these migrations without harm it makes sense to skip these migrations.
@tvdeyen tvdeyen force-pushed the migrate-to-gutentag branch from 5a46220 to daa312f Compare February 27, 2018 13:44
@tvdeyen tvdeyen merged commit c38690a into AlchemyCMS:master Feb 28, 2018
@tvdeyen tvdeyen deleted the migrate-to-gutentag branch February 28, 2018 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants