Sha256: 206ff5ecaa518b20f72b9100d461b517176a9f519026d9d8c37ecf92d7539f3b
Contents?: true
Size: 259 Bytes
Versions: 16
Compression:
Stored size: 259 Bytes
Contents
class Book < ActiveRecord::Base tableling do field :title field :author quick_search do |query,term| term = "%#{term.downcase}%" query.where('LOWER(books.title) LIKE ? OR LOWER(books.author) LIKE ?', term, term) end end end
Version data entries
16 entries across 16 versions & 2 rubygems