Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
show all
- Defined in:
- lib/easy_tag.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.acts_as_taggable(options = {}) ⇒ Object
23
24
25
26
|
# File 'lib/easy_tag.rb', line 23
def self.acts_as_taggable(options = {})
options.reverse_merge!({})
include EasyTag::Taggable
end
|
.acts_as_tagger(options = {}) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/easy_tag.rb', line 28
def self.acts_as_tagger(options = {})
options.reverse_merge!({})
include EasyTag::Tagger
EasyTag::Tagger.class_variable_set(:@@tagger_class, self)
EasyTag::Tagging.belongs_to :tagger, :class_name => self.model_name
end
|
Instance Method Details
#is_taggable? ⇒ Boolean
15
16
17
|
# File 'lib/easy_tag.rb', line 15
def is_taggable?
return false
end
|
#is_tagger? ⇒ Boolean
19
20
21
|
# File 'lib/easy_tag.rb', line 19
def is_tagger?
return false
end
|