Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Twitter Whores

May 05

I’m getting more and more follows from “Twitter Whores”. Generally I can tell they’re spam follows before I even click on the link because they’re username will be something like Username1975. Anyway, this is a completely useless post, but on the up-side it’s good to know that Twitter is taking action and suspending their accounts.

Read More

Rails 2.3.2 ActionMailer Views and Multiple Body Instance Variables

May 01

While upgrading our Rails app to version 2.3.2 I ran into a painful bug when running our unit tests. Previously, we defined ActionMailer instance variables to be used in our views like this:

@body["name"] = user.name
@body["feedback"] = feedback
@body["when"] = Time.now

I had to refactor this to use a hash as the ActionMailer documentation suggests:

body {:name => user.name, :feedback => feedback, :when => Time.now}

It turns out this doesn’t work and generates an error. So I removed the hash and did the following:

body :name => user.name, :feedback => feedback, :when => Time.now

Now all is well. It cost me an hour of my day and hopefully it will cost you much less now that you’re informed. If you can share any information why the hash doesn’t work then please feel free to share. Thanks!

Read More