这是我在Rails上遇到过的最奇怪的错误。知道这可能是什么吗?
注意:错误不是来自@ order.get_invoice_number,我试图将代码分成多行,很明显问题出在{:host ...}
ActionView::TemplateError (integer 23656121084180 too big to convert to `unsigned int') on line #56 of app/views/order_mailer/order_detail.text.html.erb:
53: <b>Order #:</b>
54: </td>
55: <td width="98%">
56: <%= link_to "#{@order.get_invoice_number}", {:host => Thread.current[:host], :controller => 'store/account', :action => 'view_order', id => "#{@order.id}"}, {:target => '_blank'} %>
57: </td>
58: </tr>
59: <tr>
app/views/order_mailer/order_detail.text.html.erb:56
app/controllers/store/
test_controller.rb:11:in `order_email'
答案 0 :(得分:0)
如果有的话,它证明程序员的工作需要更健康的睡眠习惯。
问题在于id =&gt; “#{@order.id}应为:id =&gt; ...