Methods
Public Instance methods
Override this method in your class to customize the search. This is a nice default method.
[ show source ]
# File lib/og/model/searchable.rb, line 16
16: def search(query)
17: search_props = properties.values.select { |p| p.searchable }
18: condition = search_props.collect { |p| "#{p} LIKE '%#{query}%'" }.join(' OR ')
19: all(:condition => condition)
20: end