Releases: gregorw/discriminable
Releases · gregorw/discriminable
v3.0.0
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
2.2.5 (2022-04-29)
Bug Fixes
v2.2.4
2.2.4 (2022-04-25)
Bug Fixes
- changelog url (3054a1a)
- support querying when multiple values are provided (f75190b)
v2.2.3
2.2.3 (2022-04-20)
Bug Fixes
- Allow to use attribute aliases (448e4e8)
v2.2.2
2.2.2 (2022-04-17)
Bug Fixes
v2.2.1
2.2.1 (2022-04-17)
Bug Fixes
v2.2.0
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
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
2.1.0 (2022-04-01)
Features
v2.0.0
2.0.0 (2022-03-31)
⚠ BREAKING CHANGES
Features
Bug Fixes