railsのscaffoldでdbの型名を列名に指定すると後悔する
例えば、以下のようにする。
script/generate scaffold Hoge name:string date:date
で、showを呼び出す。http://localhost:3000/hoges
すると、エラー発生。
/Users/katzchang/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:105:in `const_missing' /Users/katzchang/hoge/app/controllers/hoges_controller.rb:5:in `index'
正解は"date:date"を"hoge_date:date"等とする。
ruby 1.8.7 + rails 2.3.2でした。