If I have: [source language=":ruby"] class Product < ActiveRecord::Base acts_as_taggable end [/source] [source language=":ruby"] class Subproduct < Product class_table_inheritance end [/source] [source language=":ruby"] def find_tagged_with!(list) find_by_sql([ "SELECT #{table_name}.* FROM #{table_name} " + "WHERE #{table_name}.#{primary_key} in (" + " SELECT taggable_id FROM taggings, tags " + " WHERE tags.id=taggings.tag_id " + " AND taggings.taggable_type = ? […]
↧