Skip to content

v2.0.0

Choose a tag to compare

@enoch0x5a enoch0x5a released this 08 May 15:09
· 46 commits to master since this release

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)