hedgehog lab

Sarat Pediredla

Acts as Taskable plugin

by Sarat Pediredla

One of the great things about Rails is the ability to write and use plugins, which allow the abstraction of repeated code and re-use of code that other people have written.

We have certainly benefited from plugins in our Rails development, using some really useful plugins like acts_as_commentable, attachment_fu and asset_packager

Therefore, when we found ourselves writing repetitive code to add tasks to various objects (like people, projects etc.) in exxitplan (our latest product), I decided to abstract all of that into a plugin called acts_as_taskable. It is a blatant rip-off of the excellent acts_as_* plugins that come before it (in fact, we just did a find + replace to come up with this plugin), so people should be familiar with it.

Without much further ado, I give you acts_as_taskable.

blog comments powered by Disqus