Skip to content

Commit

Permalink
chore: Align date time select extension filename and const
Browse files Browse the repository at this point in the history
  • Loading branch information
adzap committed Nov 30, 2024
1 parent 647083f commit 5902d72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/validates_timeliness/extensions.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module ValidatesTimeliness
module Extensions
autoload :TimelinessDateTimeSelect, 'validates_timeliness/extensions/date_time_select'
autoload :DateTimeSelect, 'validates_timeliness/extensions/date_time_select'
end

def self.enable_date_time_select_extension!
require 'uri' # Do we need this? No, but the test suite fails without it.
::ActionView::Helpers::Tags::DateSelect.send(:prepend, ValidatesTimeliness::Extensions::TimelinessDateTimeSelect)
::ActionView::Helpers::Tags::DateSelect.send(:prepend, ValidatesTimeliness::Extensions::DateTimeSelect)
end

def self.enable_multiparameter_extension!
Expand Down
2 changes: 1 addition & 1 deletion lib/validates_timeliness/extensions/date_time_select.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ValidatesTimeliness
module Extensions
module TimelinessDateTimeSelect
module DateTimeSelect
# Intercepts the date and time select helpers to reuse the values from
# the params rather than the parsed value. This allows invalid date/time
# values to be redisplayed instead of blanks to aid correction by the user.
Expand Down

0 comments on commit 5902d72

Please sign in to comment.