Skip to content

Instantly share code, notes, and snippets.

@joselo
Created June 14, 2011 22:08
Show Gist options
  • Save joselo/1026047 to your computer and use it in GitHub Desktop.
Save joselo/1026047 to your computer and use it in GitHub Desktop.
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