Sha256: 93660c68efdc42adecb4d2a49ebce8387f8644c6b7763dec07b3cd7ed0cfce74
Contents?: true
Size: 399 Bytes
Versions: 1
Compression:
Stored size: 399 Bytes
Contents
class Gutentag::TaggedWith::NameQuery < Gutentag::TaggedWith::Query def initialize(model, values, match) super @values = @values.collect { |tag| Gutentag.normaliser.call(tag) } end private def taggable_ids_query Gutentag::Tagging.joins(:tag).select(:taggable_id). where(:taggable_type => model.name). where(Gutentag::Tag.table_name => {:name => values}) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gutentag-0.9.0 | lib/gutentag/tagged_with/name_query.rb |