In trying to use the text_field_with_auto_complete I am not getting my
partial to render from my auto_complete_responder_for method. If I render it
inline, the data shows up fine but I get the Javascript error "
element.className has no properties" when I try to render my partial
instead
of inline. Even if nothing is in the partial, I still get that error.
I''m
not getting which element doesn''t have the class name. Here''s
my relevant
code...
my find.rhtml template...
<h1>find someone</h1>
<%= text_field_with_auto_complete :user, :name, :skip_style => true
%><br/>
my users controller
def find
end
def auto_complete_for_user_name
auto_complete_responder_for_users params[:user][:name]
end
private
def auto_complete_responder_for_users(value)
@users = User.find(:all,
:conditions => [ ''LOWER(name) LIKE ?'',
''%'' + value.downcase + ''%'' ],
:order => ''name ASC'',
:limit => 8)
render :partial => ''users''
#render :inline => "<%= auto_complete_result @users,
''name'' %>" (this works)
end
my _users.rhtml partial
<%= error_messages_for ''user'' %>
<!--[form:user]-->
<ul class="users">
<% for user in @users do -%>
<li class="user">
<%=h user.name <http://user.name> %>
</li>
<% end -%>
</ul>
<!--[eoform:user]-->
If I should just render inline, how do I pass more than one parameter so I
can render mulitple elements inline?
Thanks!
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails