在我三年的RoR中从未听说过这个错误.~
我甚至无法调试这个,因为它没有告诉我它是如何/为什么错误的。
有什么想法吗?
日志
Processing Admin::EmailsController#test_email (for 69.114.195.64 at 2011-08-17 08:52:00) [GET]
Parameters: {"body"=>"null", "action"=>"test_email", "mail_type"=>"magic_email", "subject"=>"HQMagic Email... Surprise!", "controller"=>"admin/emails", "_"=>"1313596294081", "email"=>"daniel.levine4@gmail.com"}
ActionView::TemplateError (Need controller and action!) on line #25 of app/views/notifier/magic_email.html.haml:
22: %div{:style => "clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;"}
23: .main-image{:style => "height: 262px;"}
24: - if @email.main_deal_pic.url(:format) || @email.main_deal_pick_target
25: = link_to image_tag(@email.main_deal_pic.url(:format), :style => "margin: 0 0 0 4px; display: block; border: 0;"), @email.main_deal_pic_target, :style => "border: 0;"
26: %div{:style => "clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;"}
27: %img.header-middle{:src => "http://hqchannel.com/images/me-header-middle.jpg", :style => "display: block; margin: 0;"}
28: %div{:style => "clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;"}
答案 0 :(得分:0)
显然,您的@email.main_deal_pic_target
是nil
。就是这样。
至于没人知道你是怎么得到的main_deal_pic_target
没有人可以说为什么它是零
<强> UPD 强>
测试它:
= @ email.main_deal_pic_target.inspect