Use Restriction Shorthand symbols
masterTo avoid repetitive lambda definitions for common relative times (like today or now), you can use shorthand symbols. The plugin provides :today and :now by default.
Example usage:
validates_date :birth_date, on_or_before: :todayYou can define your own shorthand symbols in the setup block.
# in the setup block
config.restriction_shorthand_symbols.update(yesterday: lambda { 1.day.ago })