Skip to content

Latest commit

 

History

History
195 lines (103 loc) · 7.53 KB

CHANGELOG.md

File metadata and controls

195 lines (103 loc) · 7.53 KB

Changelog

All notable changes to this project (at least, from v0.5.0 onwards) will be documented in this file.

2.6.2 - 2022-11-05

Fixed

  • Documenting the Gutentag::Tag.names_for_scope method. (Ryan Romanchuk in #83).
  • Avoid double-querying of tag_names from the database. See discussion in #84.

Changed

  • Added Ruby 3.1 to the test matrix.

2.6.1 - 2021-09-18

Fixed

  • The initially-generated migrations now work out of the box with Rails 5.0+, using the 4.2 version. The generator will now update that version to the latest, or remove it for Rails 4.2. See later discussion in #80.

2.6.0 - 2021-07-10

Added

  • Queries can now be made for objects that have none of the specified tags using :match => :none (Rares S in #79).
  • Added a generator gutentag:migration_versions to update generated migrations so they use the current version of Rails/ActiveRecord's Migration superclass. See discussion in #80.

Changed

  • When adding Gutentag to a new app, the migrations require the gutentag:migration_versions generator to be run to ensure the latest ActiveRecord migration superclass is used. This change has no impact to existing apps. See discussion in #80.

2.5.4 - 2021-02-21

Fixed

  • Don't apply the tag length validation when ActiveRecord::ConnectionNotEstablished exceptions are raised. (John Duff in #77).

2.5.3 - 2020-06-28

Fixed

  • Use saved_change_to_tag_names? instead of tag_names_previously_changed? for Rails 5.1+ (Morten Trolle in #70).
  • Gutentag::Tag.names_for_scope now handles empty scopes (Mike Gunderloy in #73).

2.5.2 - 2019-07-08

Fixed

  • tag_names will no longer be referenced as a database column when tagged models are requested in joins in Rails 4.2 (as reported in issue #67).

2.5.1 - 2019-05-10

Fixed

  • Ensuring consistent behaviour for tag_names array - names are not duplicated, and are normalised prior to saving (as discussed in issue #66).

2.5.0 - 2019-03-15

Please note this release ends official support of Rails 3.2 and Ruby (MRI) 2.2. The code currently still works on Ruby 2.2, and all features except for the new Gutentag::Tag.names_for_scope method work in Rails 3.2, but they're no longer tested against, and cannot be guaranteed to work in future releases.

Added

  • Added the Gutentag::Tag.names_for_scope(scope) method, which accepts an ActiveRecord model or a relation, and returns all tag names associated to that model/relation.

Changed

  • Removing support for MRI 2.2 and Rails 3.2.

2.4.1 - 2019-02-22

Changed

  • Tests are now run against Rails 6.0, MRI 2.6, JRuby 9.2.5.
  • The README documents a simpler migration (seelensonne in #55).

Fixed

2.4.0 - 2018-05-18

Changed

  • Tag validation is now added only when the tag model is loaded, rather than when the app boots. This especially simplifies setup for non-Rails apps (Michael Grosser in #54).
  • A warning is displayed if the tag model is referenced without a database being present.
  • Models are now lazily autoloaded for non-Rails apps (when Rails::Engine isn't present).

2.3.2 - 2018-04-27

Fixed

  • The tagged_with method now finds tagged objects belonging to STI models (as discussed in #53).

2.3.1 - 2018-04-05

Fixed

  • Load tag validation code only when needed, rather than being reliant on database gems being loaded first.

2.3.0 - 2018-03-19

Changed

  • Filter out blank tag names when provided via tag_names= (as discussed in #51).

Fixed

  • Tag validations logic fails gracefully when the database server cannot be reached.

2.2.1 - 2018-03-06

Fixed

  • Fix tag_names to return persisted values on a fresh load of a tagged object (which involved distinguishing Rails 4.2 behaviour from more recent approaches).

2.2.0 - 2018-03-04

Added

  • Dirty state support for tag_names is now available for Rails 4.2 onwards, and is more reliable for Rails 3.2-4.1 (supporting all known methods, such as tag_names_changed?, previous_changes, etc.)

Changed

  • Switch normalising of tag names from a callback within Gutentag::Tag to #name= (Tomasz Ras in #47).

2.1.0 - 2018-02-01

Added

  • Gutentag::RemoveUnused is now present, and can be invoked with the call method. It will remove all unused tags (i.e. tags that aren't connected to any taggable objects). Related to #19.

Fixed

  • Tag validations logic fails gracefully when no database exists (Nishutosh Sharma in #46).

2.0.0 - 2017-12-27

Changed

This is a breaking change if you're using Gutentag without Rails: To ensure database-reliant code isn't invoked before it should be, ActiveSupport.run_load_hooks :gutentag should be called after your database is connected.

1.1.0 - 2017-12-16

No breaking changes.

Thanks to Robin, Gutentag::Tag#name will now validate default database column lengths (#41).

1.0.0 - 2017-10-29

Behaviour that was deprecated in 0.9.0 (has_many_tags, tagged_with arguments) have now been removed.

0.9.0 - 2017-06-02

  • In your models with tags, change has_many_tags to Gutentag::ActiveRecord.call self.
  • Any calls to tagged_with should change from Model.tagged_with('ruby', 'pancakes') to Model.tagged_with(:names => ['ruby', 'pancakes']).

In both of the above cases, the old behaviour will continue to work for 0.9.x releases, but with a deprecation warning.

0.8.0 - 2017-01-19

No breaking changes.

0.7.0 - 2015-08-27

No breaking changes.

0.6.0 - 2015-01-24

Rails 4.2 is supported as of Gutentag 0.6.0 - but please note that due to internal changes in ActiveRecord, changes to tag_names will no longer be tracked by your model's dirty state. This feature will continue to work in Rails 3.2 through to 4.1 though.

0.5.1 - 2014-07-29

0.5.0 - 2013-09-10

Between 0.4.0 and 0.5.0, Gutentag switched table names from tags and taggings to gutentag_tags and gutentag_taggings. This has been done to avoid conflicting with the more generic table names that may exist in Rails apps already.

If you were using Gutentag 0.4.0 (or older) and now want to upgrade, you'll need to create a migration manually that renames these tables:

rename_table :tags,     :gutentag_tags
rename_table :taggings, :gutentag_taggings

0.4.0 - 2013-09-03

0.3.0 - 2013-08-07

0.2.2 - 2013-07-25

0.2.1 - 2013-07-25

0.2.0 - 2013-07-15

0.1.0 - 2013-07-11