small cleanups

This commit is contained in:
Reinier Balt 2009-02-05 21:55:33 +01:00
parent 97f9a31d17
commit b8fd942eb4
4 changed files with 534 additions and 538 deletions

View file

@ -14,8 +14,8 @@ class SearchController < ApplicationController
@found_tags = Tagging.find_by_sql([
"SELECT DISTINCT tags.name as name "+
"FROM tags "+
"LEFT JOIN taggings ON tags.id = taggings.tag_id "+
"LEFT JOIN todos ON taggings.taggable_id = todos.id "+
"LEFT JOIN taggings ON tags.id = taggings.tag_id "+
"LEFT JOIN todos ON taggings.taggable_id = todos.id "+
"WHERE todos.user_id=? "+
"AND tags.name LIKE ? ", current_user.id, terms])