module ListGroupModule
module ListModule
class ThroughFilterList < FilterList
- attr :list, :list_name, :list_manifest
+ attr :through
def set_default
super
def init
super
- @through = @model_list_manifest.through
- @filter_table_name = ::Manifest.manifest.models[@filter_item_name].classify.table_name
- end
-
- def include_hash
- {@through => {@filter_item_name => {}} }
- end
-
- def where_condition filter_item_id
- w = self.base_where_condition
- w += ' and ' unless w.blank?
- [w + @filter_table_name + '.id' + ' = ?', filter_item_id]
+ @through = @args['through']
end
end