fc2ブログ

Railsで使ってはいけないカラム名

↓こんなエラーログがでたらテーブルのカラム名に使ってはいけない名前を使ってないかどうか確認する。「type」はだめだたった…。

undefined method `empty?' for 1:Fixnum(NoMethodError)
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1629:in `instantiate'
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:661:in `find_by_sql'
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:661:in `collect!'
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:661:in `find_by_sql'
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1553:in `find_every'
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1510:in `find_initial'
 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:613:in `find'
スポンサーサイト



Template Designed by DW99