Tag autocomplete

This commit is contained in:
Eric Allen 2009-10-16 19:23:11 -04:00
parent bfc6189611
commit 01e4cdb178
3 changed files with 6 additions and 0 deletions

View file

@ -246,6 +246,10 @@ module TodosHelper
# @contexts.empty?
array_or_string_for_javascript( current_user.contexts.collect{|c| escape_javascript(c.name) } )
end
def tag_names_for_autocomplete
array_or_string_for_javascript( Tag.all.collect{|c| escape_javascript(c.name) } )
end
def default_contexts_for_autocomplete
projects = current_user.projects.find(:all, :conditions => ['default_context_id is not null'])