funkensturm / acts_as_category

Think of acts_as_tree + acts_as_list, but doing what you want: root categories, subcategories, positions, individual inherited permissions and some script.aculo.us view helpers.

acts_as_category / init.rb
80ab5301 » funkensturm 2009-02-14 Updated to version 1.0 1 plugin_path = File.dirname __FILE__
2
3 # Loading localization files
4 I18n.load_path += Dir[File.join(plugin_path, 'config', 'locale', '*.{rb,yml}')]
5
6 # Loading Helper
7 ActionView::Base.class_eval 'include ActsAsCategoryHelper'
8
9 # Loading acts_as_*
10 ActiveRecord::Base.class_eval 'include ActiveRecord::Acts::Category'
11 ActiveRecord::Base.class_eval 'include ActiveRecord::Acts::CategoryContent'