Module: TagDangelo::ActiveRecord

Defined in:
lib/tag_dangelo/active_record.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



2
3
4
5
# File 'lib/tag_dangelo/active_record.rb', line 2

def self.included(base)
  # include our class methods
  base.extend TagDangelo::ActiveRecord::ClassMethods
end

Instance Method Details

#tag_namesObject



7
8
9
# File 'lib/tag_dangelo/active_record.rb', line 7

def tag_names
  @tag_names ||= TagDangelo::TagNames.new self
end

#tag_names=(names) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/tag_dangelo/active_record.rb', line 11

def tag_names=(names)
  @tag_names = if names.is_a?(TagDangelo::TagNames)
    names
  else
    TagDangelo::TagNames.new_with_names self, names
  end
end