It seems that you can't specify range via time_select
. The option is to cut end_time
range using javascript based on start_time
value and add custom validation for reliability: http://guides.rubyonrails.org/active_record_validations.html#custom-methods.
def end_time_validity
if end_time < start_time
errors.add(:end_time, "can't be before start time")
end
end