Sha256: 979222682892dfdc31c1d56d9b68ab7c3bf20738cfdba3b61ca4a7530f8ae727
Contents?: true
Size: 289 Bytes
Versions: 2
Compression:
Stored size: 289 Bytes
Contents
class Monologue::Tag < ActiveRecord::Base attr_accessible :name validates :name, :uniqueness => true,:presence => true has_many :taggings has_many :posts,:through=> :taggings def posts_with_tag self.posts.published end def frequency posts_with_tag.size end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
monologue-0.2.0 | app/models/monologue/tag.rb |
monologue-0.2.0.beta3 | app/models/monologue/tag.rb |