Metka Versions Save

Rails gem to manage tags with PostgreSQL array columns.

v2.3.1

3 years ago

Fixed spec for Rails master Updated Gemfile

v2.2.0

3 years ago
  • Optimised query syntax to use PostgreSQL GIN indices (thanks @BenTalagan) Please add GIN indices to you tag columns where it is necessary (e.g. if you usually search your models by tag)
class AddIndices < ActiveRecord::Migration[5.0]
  def change
    add_index :users, :tags, using: 'gin'
  end
end

  • Dropped support for Rails < 5.2
  • Switched to GitHub Actions

v2.1.0

3 years ago

Added support for Rails 6.1. Dropped support for Rails 5.0 and 5.1.

v2.0.2

3 years ago

Bumps rack from 2.0.8 to 2.2.3

v2.0.0

4 years ago

Changes

  1. Added .tagged_with scope.
class Record < ApplicationRecord
  include Metka::Model(columns: %w[tag1 tag2])
  ...
end

...

Record.tagged_with('some, tags')

# same as above
Record.tagged_with('some, tags', on: %w[tag1 tag2], exclude: false, any: false, join_operator: Metka::Or)
  1. Added ActiveRecord strategy as a default strategy, so now it is possible to generate tag clouds without generating the new migrations and database objects.

Breaking changes

  1. only single Metka::Model inclusion is allowed, so instead of:
  include Metka::Model(column: 'tags1')
  include Metka::Model(column: 'tags2')

use:

  include Metka::Model(columns: %w[tags1 tags2])

is fine:

  include Metka::Model(column: 'tags')
  1. only one tags parser is allowed per model
  include Metka::Model(columns: %w[tags1 tags2], parser: My::AwesomeParser.instance)

v1.0.3

4 years ago

Bumps nokogiri from 1.10.7 to 1.10.8.

Release notes Changelog Commits

v1.0.2

4 years ago

Bumps rack from 2.0.7 to 2.0.8.

v1.0.1

4 years ago

v1.0.0

4 years ago