Hello,
I’m trying to find out why this method, which does not seem to require a
separate template, does give errors on it. Visually the site seems
perfect,
but that’s not always a guarantee of course.
This is the method (stripped from implementation specific details):
def auto_complete_for_assignment_studentnumber
if ((params[:assignment][:studentnumber]).length > 3)
@results = ApplicationController.ldap_search(…).gsub(" ", “")
}”,
["somefields])
render :inline => “
- <% for student in @results %>
- <%=
student[‘name’] %> … <% end %>
end
end
this is the call in the view:
<tr>
<td>
<%=
text_field_with_auto_complete ‘assignment’, ‘studentnumber’, { ‘size’ =>
50, ‘value’ => ‘’ }, :indicator => “spinner” %>
The error I get:
A ActionController::MissingTemplate occurred in
assignments#auto_complete_for_assignment_studentnumber:
Missing
template
/path_to/public/…/config/…/app/views/assignments/auto_complete_for_assignment_studentnumber.rhtml
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:1034:in
`assert_existence_of_template_file’
Any ideas here? Is the if statement the problem?
Regards,
Bart