rails 2.1 scaffold問題?

1 view
Skip to first unread message

mrvh

unread,
Oct 6, 2008, 4:47:32 AM10/6/08
to Ruby on Rails Taiwan
在網頁中顯示錯誤:
==> undefined method `scaffold' for AdminController:Class
.
.
.

-----------------------------------------------------------------------------------------
class AdminController < ApplicationController
scaffold :linkpage
end

我在控制器中加入scaffold :linkpage,但為何還會有錯誤呢?

king ng

unread,
Oct 7, 2008, 10:32:55 AM10/7/08
to Ruby-on-Ra...@googlegroups.com
這種用法只在Rails 1.x。
Rails 2.0後,可如下用:
ruby script/generate scaffold product title:string description:text
image_url:string
:)
Reply all
Reply to author
Forward
0 new messages