Tags:
Forums: 

ปัญหามันมีอย่างนี้ครับ
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
model :cart
model :order_item
end

แต่พอรันแล้วมันเกิด error ตัวนี้อะครับ
undefined method `model' for ApplicationController:Class

พอจะรู้บ้างใหมครับ วานคนรู้ช่วยหน่อยครับ

Get latest news from Blognone
By: Sikachu
ContributoriPhoneIn Love
on 11 January 2009 - 04:45 #80083
Sikachu's picture

ตามหลักแล้วเราไม่จำเป็นต้องประกาศว่าจะให้มี model อะไรใน controller ครับ ..

แต่ว่า rails จะเข้าไปอ่านใน /app/models เองครับ :)

บล็อกของผม: http://sikachu.com


บล็อกของผม: http://sikachu.com

By: weerawat on 12 January 2009 - 17:02 #80291

เข้า บล็อกแล้วอ่าครับ แต่ว่าไม่รู้จะเข้าไป post หรือ ดูคนอื่น post ยังงัย