Module: Taggable
- Defined in:
- lib/taggable.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/taggable.rb', line 19 def self.included klass klass.class_eval do many :tags, :as => :taggable include InstanceMethods end end |
Instance Method Details
#split_tags(tag_str) ⇒ Object
14 15 16 17 |
# File 'lib/taggable.rb', line 14 def tag_str return [] if tag_str.empty? tag_str.split(",").collect(&:strip) end |