eddorre

Akismet Ruby on Rails Plugin

I’m re-doing my blog engine. I’m focusing on refactoring old crufty code as well as expanding my knowledge of Ruby on Rails.

So far everything is on track and I should be done with it soon. One of the things that I wanted to focus on was the use of modules and plugins. Last time, I was using my own code for accessing the Akismet web service. This time around, I downloaded the ror-akismet plugin and I’m extending my comments class using the built in downloaded methods.

However there seemed to be a bug in the works. Every time that I included the declaration “include Akismet” into my comments controller, all of the other methods would break.

I started tearing out bits of my code and then the modules’ code and no matter what I did, everything would go to hell when I added the include declaration.

It turns out that Rails (1.2.3) seemed to be freaking out because the plugin directory that was downloaded was called ror-akismet.

Once I changed it to ror_akismet, everything worked fine.


Add Your Comment