v2.0.0
Changes
- Added
.tagged_withscope.
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)- 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
- only single
Metka::Modelinclusion 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')- only one tags parser is allowed per model
include Metka::Model(columns: %w[tags1 tags2], parser: My::AwesomeParser.instance)