Created
April 22, 2009 14:39
-
-
Save jerodsanto/99827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pickup < ActiveRecord::Base | |
validate_on_create :date_three_days_in_future | |
private | |
def date_three_days_in_future | |
errors.add_to_base "must be at least 3 days from now" unless date >= 3.days.from_now.to_date | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment