【ruby on rails】active_record/base.rbにてsyntax error, unexpected tINTEGER

DBのカラム名にtypeという名前をつけると、ActiveRecordは正しく動作しないようです。
migrate時にエラーって言って欲しいですよ(´・ω・`)

/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:1361: syntax error, unexpected tINTEGER
Object::1
         ^):
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:1361:in `compute_type'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:1066:in `instantiate_without_callbacks'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/callbacks.rb:204:in `instantiate'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:427:in `find_by_sql'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:427:in `collect!'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:427:in `find_by_sql'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:997:in `find_every'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:991:in `find_initial'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/base.rb:417:in `find'
タグ:[ruby on rails

このログへのコメント(0件)

コメント投稿フォーム

コメント

※半角英数字だけのコメントは投稿できません。

トラックバック

関連ログ