Skip to content

Instantly share code, notes, and snippets.

@javier
Created May 12, 2009 14:38
Show Gist options
  • Save javier/110520 to your computer and use it in GitHub Desktop.
Save javier/110520 to your computer and use it in GitHub Desktop.
def twitter_me
language=(user && !user.language.blank?) ? user.language : LocalText.default_language
translated_type=LocalText.text(language,:listing_types,listing_type.to_sym)
final_message="##{translated_type} http://#{HOST}/listings/#{self[:id]} #{message}"
twit=Twitter::Base.new TWITTER_USER, TWITTER_PASSWORD
twit.update "#{final_message[0,130]}..."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment