lib/devape_cms.rb in devape_cms-0.1.6 vs lib/devape_cms.rb in devape_cms-0.1.7

- old
+ new

@@ -1,7 +1,30 @@ require "devape_cms/engine" require "devise" require "acts_as_tree" require "friendly_id" +module DevapeMemberNavigation + mattr_accessor :items + self.items = [] + module Hooks + def register_navigation_item(item) + DevapeMemberNavigation.items << item + end + end +end +module DevapeAdminNavigation + mattr_accessor :admin_items + self.admin_items = [] + module Hooks + def register_admin_item(admin_item) + DevapeAdminNavigation.admin_items << admin_item + end + end +end module DevapeCms + extend DevapeMemberNavigation::Hooks + extend DevapeAdminNavigation::Hooks end + +DevapeCms.register_navigation_item('/member/posts') +DevapeCms.register_admin_item('/posts')