Skip to content

Releases: gregorw/discriminable

v3.0.0

21 Aug 22:33
a2e0c37
Compare
Choose a tag to compare

3.0.0 (2022-08-21)

⚠ BREAKING CHANGES

  • get rid of legacy hash notation

Features

  • Alternate syntax using attribute/value instead of prepositions (d0843e4)

Bug Fixes

v2.2.5

29 Apr 10:55
df3e49b
Compare
Choose a tag to compare

2.2.5 (2022-04-29)

Bug Fixes

v2.2.4

25 Apr 16:39
de39379
Compare
Choose a tag to compare

2.2.4 (2022-04-25)

Bug Fixes

  • changelog url (3054a1a)
  • support querying when multiple values are provided (f75190b)

v2.2.3

20 Apr 21:42
ee40087
Compare
Choose a tag to compare

2.2.3 (2022-04-20)

Bug Fixes

  • Allow to use attribute aliases (448e4e8)

v2.2.2

17 Apr 18:33
1014896
Compare
Choose a tag to compare

2.2.2 (2022-04-17)

Bug Fixes

v2.2.1

17 Apr 08:59
7a1d66c
Compare
Choose a tag to compare

2.2.1 (2022-04-17)

Bug Fixes

v2.2.0

16 Apr 21:56
e0b7d13
Compare
Choose a tag to compare

2.2.0 (2022-04-16)

Features

  • Alternative syntax respecting open-closed principle (8a8f885)

Comments

New class methods discriminable_by and discriminable_as added:

class Order < ActiveRecord::Base
  include Discriminable

  discriminable_by :state
end

class Cart < Order
  discriminable_as :open
end

Thanks to @koffeinfrei for the naming suggestion discriminable_as.

Note that the naming of these methods is Rails inspired — e.g. compare them with respond_to and respond_with.

v2.1.1

15 Apr 15:44
83647b9
Compare
Choose a tag to compare

2.1.1 (2022-04-15)

Bug Fixes

  • Subclass is not properly initialized on new objects (c24706c)
  • Use correct, i.e. first value, when using multiple states for same subclass (3a05c0d)

v2.1.0

01 Apr 07:13
44ece01
Compare
Choose a tag to compare

2.1.0 (2022-04-01)

Features

v2.0.0

31 Mar 22:03
5f4f56b
Compare
Choose a tag to compare

2.0.0 (2022-03-31)

⚠ BREAKING CHANGES

  • simplified api

Features

Bug Fixes