Skip to content

Instantly share code, notes, and snippets.

@eagsalazar
Created June 27, 2012 23:14
Show Gist options
  • Save eagsalazar/3007503 to your computer and use it in GitHub Desktop.
Save eagsalazar/3007503 to your computer and use it in GitHub Desktop.
class Schedule
include Mongoid::Document
include Mongoid::Timestamps
OPTIONS_FOR_TIMEZONES = [
['Pacific Time (GMT -8:00)', "Pacific Time (US & Canada)"],
['Eastern Time (GMT -5:00)', "Eastern Time (US & Canada)"],
['Central Time (GMT -6:00)', "Central Time (US & Canada)"],
['Mountain Time (GMT -7:00)', "Mountain Time (US & Canada)"],
['London (GMT +0:00)', "London"],
['Paris (GMT +1:00)', "Paris"],
['Tokyo (GMT +9:00)', "Tokyo"]
]
field :hour, :type => Integer, :default => 8
field :ampm, :type => String, :default => "am"
field :time_zone, :type => String, :default => "Eastern Time (US & Canada)"
field :monday, :type => Boolean, :default => true
field :wednesday, :type => Boolean, :default => true
field :friday, :type => Boolean, :default => true
field :tuesday, :type => Boolean, :default => false
field :thursday, :type => Boolean, :default => false
field :saturday, :type => Boolean, :default => false
field :sunday, :type => Boolean, :default => false
embedded_in :user
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment