Sha256: 3892b5c14ac7a99cdc355d9b51f0b88af3b52d095d4bfc06296c57aed3ae55dd
Contents?: true
Size: 384 Bytes
Versions: 8
Compression:
Stored size: 384 Bytes
Contents
module Writefully class Tag < ActiveRecord::Base self.table_name = "writefully_tags" has_many :taggings 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
8 entries across 8 versions & 1 rubygems