Module: Noodall::Tagging::InstanceMethods
- Defined in:
- lib/noodall/tagging.rb
Instance Method Summary collapse
Instance Method Details
#related(options = {}) ⇒ Object
53 54 55 |
# File 'lib/noodall/tagging.rb', line 53 def ( ={}) self.class.all(.merge({:_id => {'$ne' => self._id}, :tags => /(#{self..join('|')})/i})) end |
#tag_list ⇒ Object
49 50 51 |
# File 'lib/noodall/tagging.rb', line 49 def tag_list .join(', ') end |
#tag_list=(string) ⇒ Object
45 46 47 |
# File 'lib/noodall/tagging.rb', line 45 def tag_list=(string) self. = string.to_s.split(',').map{ |t| t.strip.downcase }.reject(&:blank?).compact.uniq end |