Skip to content

Instantly share code, notes, and snippets.

@csessig86
Created August 2, 2016 21:30
Show Gist options
  • Save csessig86/03105e5286240d92f6c13ec7b8be1ab1 to your computer and use it in GitHub Desktop.
Save csessig86/03105e5286240d92f6c13ec7b8be1ab1 to your computer and use it in GitHub Desktop.
If, else start time
if params[:event][:start_time_time].to_time >= params[:event][:end_time_time].to_time
@event = Event.new(event_params)
@event.errors[:base] << "The end time must be after the start time."
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment