Sha256: 457e17264ca9ae734b416bc704d87118a38d3c760a25b211d1cbf1c3240080e5
Contents?: true
Size: 364 Bytes
Versions: 6
Compression:
Stored size: 364 Bytes
Contents
class Tag < ActiveRecord::Base has_many :taggings has_many :taggables, :through => :taggings has_one :tagging has_many :tagged_posts, :through => :taggings, :source => 'taggable', :source_type => 'Post' end class OrderedTag < Tag self.table_name = "tags" has_many :taggings, -> { order('taggings.id DESC') }, foreign_key: 'tag_id' end
Version data entries
6 entries across 6 versions & 1 rubygems