ビューに <%= "%.1f" % (r.lint/@compare*100) %> 行があるため、Rails アプリケーションに「Array can't be coerced into Float」というエラーが表示されます。どんな助けでも大歓迎です。
意見
<% @result.each do |r| %>
<%= "%.2f" % (r.lint/227) %></br>
<%= "%.2f" % (r.lint/227/2.47) %></td>
<%= "%.1f" % (r.lint/@compare*100) %>
<% end %>
コントローラ
def trial
@result = Result.where('trial_id' => params[:trial_id]).order('lint DESC')
@compare = Trial.where('trial_id' => params[:trial_id]).pluck(:comp_lint)
end