Skip to content

Releases: BaseSecrete/type_scopes

0.5.0

02 Jul 15:11
Compare
Choose a tag to compare

This version brings the following new features :

  • Add negative string scopes
  • Add sensitive options to string scopes
  • Add column_matches scope to handle regex
  • Existing scopes are not overridden any more
  • Queries are generated with Arel instead of raw SQL

0.4.0

22 Jun 09:02
Compare
Choose a tag to compare

This release adds automatically 3 new ActiveRecord scopes for dates and numerics columns :

Transaction.amount_not_between(100, 200)
# => where("amount NOT BETWEEN 100 AND 200")

Transaction.amount_within(100, 200)
# => where("amount > 100 AND amount < 200")

Transaction.amount_not_within(100, 200)
# => where("amount <= 100 OR amount >= 200")