good!
#12 楼 @piecehealth 是的,就是这个问题,以后写代码要细致了,谢谢大家
谢谢大家了
#2 楼 @lyfi2003 抛出的异常是:ArgumentError (wrong number of arguments (0 for 1)): 很奇怪
ArgumentError (wrong number of arguments (0 for 1)):
app/models/cart.rb:2:in `<class:Cart>'
app/models/cart.rb:1:in `<top (required)>'
app/controllers/application_controller.rb:7:in `current_cart'
app/controllers/line_items_controller.rb:43:in `create'
car.rb 中
lass Cart < ActiveRecord::Base
has_many :line_items, :dependent => destroy
# attr_accessible :title, :body
end
#12 楼 @placeintime 非常感谢,我明白了
@huacnlee 求教,感谢~
已解决