Sha256: f4e3cb5c8aeb3386fe74a04c3d1eb5492a8cb9efd4317db04886f87951baa697
Contents?: true
Size: 351 Bytes
Versions: 8
Compression:
Stored size: 351 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
8 entries across 8 versions & 1 rubygems