私は2つのテーブルtable1とtable2を持っており、has_many belongs_to関係があります(table1には多くのtable2があり、table2はtable1に属しています)そのように値を書きますtable2.table1.where(.....)
が、次のエラーがあります
NoMethodError: undefined method `where' for #<table1:0xc59764c>
私は2つのテーブルtable1とtable2を持っており、has_many belongs_to関係があります(table1には多くのtable2があり、table2はtable1に属しています)そのように値を書きますtable2.table1.where(.....)
が、次のエラーがあります
NoMethodError: undefined method `where' for #<table1:0xc59764c>