Skip to content

Instantly share code, notes, and snippets.

@mikebaldry
Created September 21, 2012 10:23
Show Gist options
  • Select an option

  • Save mikebaldry/3760790 to your computer and use it in GitHub Desktop.

Select an option

Save mikebaldry/3760790 to your computer and use it in GitHub Desktop.
def is_votable?
return false unless active
running?
end
def time_boxed?
starting_at.nil? && ending_at.nil?
end
def running?
return true if time_boxed?
Time.now > starting_at && Time.now < ending_at
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment