On Mon, Mar 2, 2009 at 7:10 PM, Me
<chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Is the normal autocomplete supposed to pull from the DB what is in the
> field when doing an edit or is there something else that needs to be
> done to get it to show up while doing an edit?
I provide a Javascript array, using this method:
def users_list
@users = User.find( :all, :order => ''username'' )
headers['' content-type'' ] = ''
text/javascript''
render :action => ''users_list'', :layout => false
end
and this view:
var users = new Array(<%= @users.size %>);
<% @users.each_with_index do |user, index| -%>
users[<%= index %>] = ''<%= user.username %>'';
<% end -%>
--
Greg Donald
http://destiney.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---