class Gutentag::TaggedWith::NameQuery
Public Class Methods
new(model, values, match)
click to toggle source
Calls superclass method
Gutentag::TaggedWith::Query::new
# File lib/gutentag/tagged_with/name_query.rb, line 4 def initialize(model, values, match) super @values = @values.collect { |tag| Gutentag.normaliser.call(tag) } end
Private Instance Methods
taggable_ids_query()
click to toggle source
# File lib/gutentag/tagged_with/name_query.rb, line 12 def taggable_ids_query Gutentag::Tagging.joins(:tag).select(:taggable_id). where(:taggable_type => model.base_class.name). where(Gutentag::Tag.table_name => {:name => values}) end