我正在查看Checkout控制器的源代碼(https://github.com/spree/spree/blob/0-60-stable/core/app/controllers/checkout_controller.rb),但未在其中找到編輯操作。它在哪裏定義?Checkout控制器的編輯操作
4
A
回答
0
Spree使用resource_controller gem - https://github.com/jamesgolick/resource_controller,所以未在Spree代碼中定義的操作可能會在resource_controller中運行。
5
CheckoutController具有隱含的編輯操作。編輯本身沒有直接的邏輯。
然而,存在的的before_filter:load_order這反過來觸發before_ [狀態]回調方法,這取決於哪個狀態結帳是
0
有一個在施普雷沒有編輯操作:: CheckoutController但它呈現結帳/ edit.html.erb。引用超類動作。以下引用來自狂熱文檔
The edit action renders the checkout/edit.html.erb template, which then renders a partial with the current state, such as app/views/spree/checkout/address.html.erb. This partial shows state-specific fields for the user to fill in. If you choose to customize the checkout flow to add a new state, you will need to create a new partial for this state.
相關問題
- 1. 空值返回到控制器編輯操作
- 2. Rails控制器編輯操作 - 如何避免顯示id?
- 3. 點擊編輯控件 - 如何操作?
- 4. 重載控制器操作
- 5. Zend - 控制器/操作ACL
- 6. 操作控制寄存器
- 7. 的DevExpress MVC編輯控制器上的
- 8. ASP.NET的代碼編輯器控制
- 9. 可以將edit_order_path連接到訂單控制器的「修改」操作(而不是「編輯」操作)嗎?
- 10. 如何從控制器操作中調用另一個控制器操作?
- 11. 如何將授權邏輯與控制器操作分開?
- 12. 版本控制視頻編輯工作
- 13. 特定控制器的操作列表
- 14. JavaScript中的參考控制器操作
- 15. 僅限網站的控制器操作
- 16. 查找破壞的控制器操作
- 17. 控制器操作的路徑
- 18. 從控制器檢索操作的URL
- 19. 軌道 - 乾涸的控制器操作
- 20. Eclipse:作爲編輯器選項卡的控制檯窗口
- 21. 從其他控制器訪問我的動作編輯
- 22. MVC;錯誤消息在我的控制器HTTPOST動作編輯
- 23. 編輯/從視圖控制器
- 24. 許多視圖控制器編輯NSString?
- 25. 從push segue編輯導航控制器
- 26. iPhone:查看/編輯/列表控制器
- 27. CakePHP測試控制器添加編輯
- 28. ASP.NET MVC編輯操作?
- 29. 編輯操作返回null
- 30. MVC Crud操作編輯