replace old prototype/jrails code for periodic checks and start work on autocomplete and edit projects

Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
Reinier Balt 2010-10-05 21:27:00 +02:00
parent 69c811e365
commit c834403340
24 changed files with 588 additions and 53 deletions

View file

@ -136,7 +136,7 @@ class ApplicationController < ActionController::Base
def for_autocomplete(coll, substr)
filtered = coll.find_all{|item| item.name.downcase.include? substr.downcase}
return filtered.map {|item| "#{item.name}|#{item.id}"}.join("\n")
return "[{" + filtered.map {|item| "\"value\"=\"#{item.name}\", \"id\"=\"#{item.id}\""}.join("},{") + "}]"
end
# Uses RedCloth to transform text using either Textile or Markdown Need to