Module: Taggable::FacetedPage

Included in:
LibraryPage
Defined in:
lib/taggable/faceted_page.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This module can be mixed into any Page subclass to give it mystical web 2.0 faceting powers. Any nonexistent child path is assumed to be a tag set, and methods are provided for reading that set, and adding and removing tags.



12
13
14
15
16
17
18
# File 'lib/taggable/faceted_page.rb', line 12

def self.included(base)
  base.extend ClassMethods
  base.class_eval {
    include InstanceMethods
    alias_method_chain :path, :tags
  }
end