Created
June 14, 2011 22:08
-
-
Save joselo/1026047 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
def publish | |
if approved? | |
if !is_for_the_future? | |
publish! | |
if publish_in_twitter | |
if result = publish_on_twitter | |
self.twitter_status = result | |
end | |
end | |
save! | |
end | |
end | |
end | |
def is_for_the_future? | |
publish_datetime.to_time > DateTime.now.to_time | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment