Convert acts_as_category to a Rails gem