0
코드 테이블 상환 검색에 대한 질문이 있으며 사용자가 테이블 사용자로 입력했습니다. 이 형태의 검색입니다 :조인 테이블, 루비 레일로 검색
<%= form_tag reimburses_searchreimburse_path, method: :get do %>
<%= text_field_tag :reimburse, params[:reimburse] %>
<%= submit_tag "Search", name: nil%>
<% end %>
def searchreimburse
@users = User.where("username LIKE ? ", "%#{params[:reimburse]}%")
@reimburses = Reimburse.all
@project = Project.all
end
내가 원하는이 컨트롤러 같은 출력 :
<tr>
<th >#</th>
<th >Date</th>
<th >Project name</th>
<th >Title</th>
<th >User name</th> #*this from table user*
<th >Status</th>
<th >Action</th>
</tr>
무엇이 문제입니까? – ryudice