Sha256: 664dcc21215653065c9937427a14eb41d32266ade31f7b6353265135679180ab
Contents?: true
Size: 371 Bytes
Versions: 12
Compression:
Stored size: 371 Bytes
Contents
class Book < ActiveRecord::Base include ThinkingSphinx::Scopes has_and_belongs_to_many :genres sphinx_scope(:by_query) { |query| query } sphinx_scope(:by_year) do |year| {:with => {:year => year}} end sphinx_scope(:by_query_and_year) do |query, year| [query, {:with => {:year =>year}}] end sphinx_scope(:ordered) { {:order => 'year DESC'} } end
Version data entries
12 entries across 12 versions & 1 rubygems