tracks/app/models/note.rb
Matt Rogers f541a4c9d6 Simplify SearchController#results
Give names to the various things being searched for and move them out
into their own methods. Also add scopes to give names to things being
queried out of the models.
2013-03-12 19:49:19 -05:00

8 lines
169 B
Ruby

class Note < ActiveRecord::Base
belongs_to :user
belongs_to :project
attr_protected :user
scope :with_body, lambda { |terms| where("body LIKE ?", terms) }
end