RoR検索フォームを作成しています。(コードの抜粋は長く見えますが、非常に単純です。)
これは app/views/layouts/application.html.erbファイル の 内容です
<!DOCTYPE html>
<html>
<head>
<title><%= controller.action_name %></title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<span style="text-align: right">
<% form_tag "/client_workouts/find" do %>
<%= text_field_tag :search_string %>
<%= submit_tag "Search" %>
<% end %>
</span>
<p style="color: green"><%= flash[:notice] %></p>
<%= yield %>
</body>
</html>
これは app/views/client_workouts/index.html.erbファイルの内容です
<h1>Listing client_workouts</h1>
<table>
<thead>
<tr>
<th>Client name</th>
<th>Trainer</th>
<th>Duration mins</th>
<th>Date of workout</th>
<th>Paid amount</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @client_workouts.each do |client_workout| %>
<tr>
<td><%= client_workout.client_name %></td>
<td><%= client_workout.trainer %></td>
<td><%= client_workout.duration_mins %></td>
<td><%= client_workout.date_of_workout %></td>
<td><%= client_workout.paid_amount %></td>
<td><%= link_to 'Show', client_workout %></td>
<td><%= link_to 'Edit', edit_client_workout_path(client_workout) %></td>
<td><%= link_to 'Destroy', client_workout, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Client workout', new_client_workout_path %>
これはブラウザのページの出力http://rubyonrails/client_workouts
です:
<html><head>
<title>index</title>
<link rel="stylesheet" media="all" href="/assets/application.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/stylesheets/ads.css.bak.css" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/client_workouts.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/events.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/scaffolds.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/tickets.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/welcome.css?body=1" data-turbolinks-track="true">
<script src="/assets/jquery.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery_ujs.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/turbolinks.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/ads.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/client_workouts.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/events.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/tickets.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/welcome.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/application.js?body=1" data-turbolinks-track="true"></script>
<meta name="csrf-param" content="authenticity_token">
<meta name="csrf-token" content="i4JT3M6zVgdVPXQoW2hNcD+MlA7TpGsiNkBxAD3LuAg=">
</head>
<body>
<span style="text-align: right">
</span>
<p style="color: green"></p>
<h1>Listing client_workouts</h1>
<table>
<thead>
<tr>
<th>Client name</th>
<th>Trainer</th>
<th>Duration mins</th>
<th>Date of workout</th>
<th>Paid amount</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Tuyen</td>
<td>Julie</td>
<td>20</td>
<td>2013-07-11</td>
<td>20</td>
<td><a href="/client_workouts/1">Show</a></td>
<td><a href="/client_workouts/1/edit">Edit</a></td>
<td><a rel="nofollow" href="/client_workouts/1" data-method="delete" data-confirm="Are you sure?">Destroy</a></td>
</tr>
<tr>
<td>Thuy</td>
<td>Julie</td>
<td>30</td>
<td>2013-07-11</td>
<td>30</td>
<td><a href="/client_workouts/2">Show</a></td>
<td><a href="/client_workouts/2/edit">Edit</a></td>
<td><a rel="nofollow" href="/client_workouts/2" data-method="delete" data-confirm="Are you sure?">Destroy</a></td>
</tr>
</tbody>
</table>
<br>
<a href="/client_workouts/new">New Client workout</a>
</body></html>
bodyタグのすぐ下にある spanタグを見ると、検索フォームがありません。
ここで何が欠けているか知っていますか?