mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
change shorthand values to current timezone (thanks rpbertp13)
This commit is contained in:
@@ -19,8 +19,8 @@ ValidatesTimeliness.setup do |config|
|
||||
#
|
||||
# Shorthand date and time symbols for restrictions
|
||||
# config.restriction_shorthand_symbols.update(
|
||||
# :now => lambda { Time.now },
|
||||
# :today => lambda { Date.today }
|
||||
# :now => lambda { Time.current },
|
||||
# :today => lambda { Date.current }
|
||||
# )
|
||||
#
|
||||
# Use the plugin date/time parser which is stricter and extendable
|
||||
|
||||
@@ -35,8 +35,8 @@ module ValidatesTimeliness
|
||||
# Shorthand time and date symbols for restrictions
|
||||
mattr_accessor :restriction_shorthand_symbols
|
||||
@@restriction_shorthand_symbols = {
|
||||
:now => lambda { Time.now },
|
||||
:today => lambda { Date.today }
|
||||
:now => lambda { Time.current },
|
||||
:today => lambda { Date.current }
|
||||
}
|
||||
|
||||
def self.parser
|
||||
|
||||
Reference in New Issue
Block a user