在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
我用的是rails 2.0.2 在cart creation一章中我写的所有的代码都没有问题,除了开始的错误是“页面无法找到”。 上网查了一下说是用如下的解决方式即加上两行代码 "model :cart model :line_item" 如下: # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details # Uncomment the :secret if you're not using the cookie session store protect_from_forgery # :secret => '00df83fd9a7c900f90067f3893d03eb7'\ model :cart model :line_item end 可是再次运行就报了这么一个错误: NoMethodError undefined method `model' for ApplicationController:Class RAILS_ROOT: E:/temp/demoNetBean |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论