validate date and time inputs

This commit is contained in:
wvengen 2014-06-02 15:47:29 +02:00
parent 8c0df3b4e8
commit c64a7ba3cd
3 changed files with 82 additions and 9 deletions

View file

@ -32,7 +32,8 @@ class Order < ActiveRecord::Base
scope :recent, -> { order('starts DESC').limit(10) }
# Allow separate inputs for date and time
include DateTimeAttribute
# with workaround for https://github.com/einzige/date_time_attribute/issues/14
include DateTimeAttributeValidate
date_time_attribute :starts, :ends
def stockit?