Class: RocketTag::Tag
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- RocketTag::Tag
- Defined in:
- lib/rocket_tag/tag.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.by_taggable_type(type) ⇒ Object
9 10 11 |
# File 'lib/rocket_tag/tag.rb', line 9 def self.by_taggable_type(type) joins{taggings}.where{taggings.taggable_type == type.to_s} end |
Instance Method Details
#tags_count ⇒ Object
13 14 15 |
# File 'lib/rocket_tag/tag.rb', line 13 def self[:tags_count].to_i end |