Ruby 在openproject中导入.csv文件
当我尝试导入.csv文件时,会收到以下错误消息 MY index.html.erbRuby 在openproject中导入.csv文件,ruby,ruby-on-rails-5,openproject,eruby,Ruby,Ruby On Rails 5,Openproject,Eruby,当我尝试导入.csv文件时,会收到以下错误消息 MY index.html.erb <h1>Users1#index</h1> <p>Find me in app/views/users1/index.html.erb</p> <%= flash[:notice] %> <table> <thead> <tr> <th>Projects</th> <th>T
<h1>Users1#index</h1>
<p>Find me in app/views/users1/index.html.erb</p>
<%= flash[:notice] %>
<table>
<thead>
<tr>
<th>Projects</th>
<th>Task ID</th>
<th>Tasks</th>
</tr>
</thead>
<tbody>
<% @users1.each do |user| %>
<tr>
<td><%= user.project %></td>
<td><%= user.task_id %></td>
<td><%= user.task %></td>
</tr>
<% end %>
</tbody>
</table>
<div>
<h4>Import that data!</h4>
<%= form_tag import_users_path, multipart: true do %>
<%= file_field_tag :file %>
<%= submit_tag "Import CSV" %>
<% end %>
</div>
Users1#索引
在app/views/users1/index.html.erb中查找我
<h1>Users1#index</h1>
<p>Find me in app/views/users1/index.html.erb</p>
<%= flash[:notice] %>
<table>
<thead>
<tr>
<th>Projects</th>
<th>Task ID</th>
<th>Tasks</th>
</tr>
</thead>
<tbody>
<% @users1.each do |user| %>
<tr>
<td><%= user.project %></td>
<td><%= user.task_id %></td>
<td><%= user.task %></td>
</tr>
<% end %>
</tbody>
</table>
<div>
<h4>Import that data!</h4>
<%= form_tag import_users_path, multipart: true do %>
<%= file_field_tag :file %>
<%= submit_tag "Import CSV" %>
<% end %>
</div>
项目
任务ID
任务
导入数据!
首先,我会询问您是否为User和AnonymousUser使用单个表。匿名用户是否响应:project
<h1>Users1#index</h1>
<p>Find me in app/views/users1/index.html.erb</p>
<%= flash[:notice] %>
<table>
<thead>
<tr>
<th>Projects</th>
<th>Task ID</th>
<th>Tasks</th>
</tr>
</thead>
<tbody>
<% @users1.each do |user| %>
<tr>
<td><%= user.project %></td>
<td><%= user.task_id %></td>
<td><%= user.task %></td>
</tr>
<% end %>
</tbody>
</table>
<div>
<h4>Import that data!</h4>
<%= form_tag import_users_path, multipart: true do %>
<%= file_field_tag :file %>
<%= submit_tag "Import CSV" %>
<% end %>
</div>