Sha256: 89ebc40a690e89dbab9026ede7441b5d5659a95c93f5fe5d7a18d15cb4ba6f7d
Contents?: true
Size: 405 Bytes
Versions: 17
Compression:
Stored size: 405 Bytes
Contents
module Writefully class Tag < ActiveRecord::Base self.table_name = "writefully_tags" has_many :taggings, dependent: :destroy has_many :posts, through: :taggings class << self def ids_from_tokens tokens taxon = Taxon.new(tokens, pluck(:name), name) import taxon.non_existing where(slug: tokens.map { |t| t.parameterize }).ids end end end end
Version data entries
17 entries across 17 versions & 1 rubygems