mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 22:41:48 +01:00
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.
This commit is contained in:
parent
63fc460c00
commit
f541a4c9d6
4 changed files with 34 additions and 26 deletions
|
|
@ -4,4 +4,5 @@ class Note < ActiveRecord::Base
|
|||
|
||||
attr_protected :user
|
||||
|
||||
scope :with_body, lambda { |terms| where("body LIKE ?", terms) }
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue