Created
March 10, 2010 22:42
-
-
Save amrnt/328547 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 Period < ActiveRecord::Base | |
belongs_to :show | |
def show_date | |
start_at.nil? ? Time.now.to_date : start_at.to_date | |
end | |
def start_at_time | |
start_at.nil? ? Time.now.to_time : start_at.to_time | |
end | |
def end_at_time | |
end_at.nil? ? Time.now.to_time : end_at.to_time | |
end | |
def start_at_time=(start_str) | |
self.start_at = BLAAALALALAL | |
end | |
def end_at_time=(end_str) | |
self.end_at = BLAAALALALAL | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment