Agile Web Development

Build it. Launch it. Love it.

acts_as_twittertasticable!!

ActsAsTwittertasticable

=================

Twitter is all the rage these days, and I only have one question

Why do people get to have ALL THE FUN?!

It’s time for Higher Order Models™®©. Models that tell the world what they’re up to using Twitter, just like normal people.

ActsAsTwittertasticable fills this void and brings Twitter directly to your AR models. It’s super duper simple.

Set up your Twitter authentication in environment.rb:

  TwitterAuth.username = "my_twitter_username"
  TwitterAuth.password = "my_twitter_password"

Then twitterize your model:

  class Movie < ActiveRecord::Base
    go_twitterize!
  end

That’s it! Unfortunately the default status message is informational, not fun. I assume that you’re more fun than me, so feel free to define the status however you want. Again, super duper simple:

  class Movie < ActiveRecord::Base
    go_twitterize!

    def twitter_status
      "I'm watching #{title} starring #{star}!!"
    end
  end

Written by Pat Maddox. Released under the MIT License. svn://evang.eli.st/public/plugins/acts_as_twittertasticable

Vitals

Home http://evang.eli.st/blog/2007/3/16/introducing-acts_as_twittertasticable
Repository svn://evang.eli.st/public/plugins/acts_as_twittertasticable
License Rails' (MIT)
Tags Tag_red status twitter
Rating (15 votes)
Owner Pat Maddox
Created 16 March 2007

Comments

Add a comment