【发布时间】:2012-07-03 18:15:21
【问题描述】:
我正在使用这本书第 4 版,并且我已经完成了发送确认电子邮件的部分,但是当我在浏览器中进行测试时,我在下订单时遇到了问题……在这本书中(图 12.2:我们的结帐屏幕)
ActionView::MissingTemplate in Orders#create 显示 c:/Sites/final/app/views/notifier/order_received.text.erb 其中第 7 行出现:
缺少带有 {:locale=>[:en], :formats=>[:text], :handlers=>[:erb, :builder, :jbuilder, :coffee]} 的部分 line_items/line_item。搜索:*“c:/Sites/final/app/views”
提取的源代码(第 7 行附近):
4:
5: You ordered the following items:
6:
7: <%= render @order.line_items %>
8:
9: We'll send you a separate e-mail when your order ships.
Rails.root: c:/Sites/final
应用程序跟踪 |框架跟踪 |完整跟踪 app/views/notifier/order_received.text.erb:7:in _app_views_notifier_order_received_text_erb___555088091_31657836' app/mailers/notifier.rb:12:inorder_received' app/controllers/orders_controller.rb:58:in block in create' app/controllers/ orders_controller.rb:54:increate'
有什么想法吗???
【问题讨论】:
-
请使用四个空格缩进您的源代码示例以确保格式正确。它使您的问题更易于阅读。
标签: ruby-on-rails