Metka v2.0.0 Release Notes

Release Date: 2020-05-08 // almost 4 years ago
  • ๐Ÿ”„ Changes

    1. Added .tagged_with scope.

      class Record < ApplicationRecordinclude Metka::Model(columns: %w[tag1 tag2]) ...end...Record.tagged_with('some, tags')# same as aboveRecord.tagged_with('some, tags', on: %w[tag1 tag2], exclude: false, any: false, join_operator: Metka::Or)

    0๏ธโƒฃ 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)