2014-06-21から1日間の記事一覧
はまったこと # id='2a2' model = model.where(relation_id: id) を実行するとrelation_idが2のデータが取得される。 実行されたSQL select model.* from model where model.relation_id = 2 原因はto_iメソッド relation_idはinteger型なので、idがstring型…
はまったこと # id='2a2' model = model.where(relation_id: id) を実行するとrelation_idが2のデータが取得される。 実行されたSQL select model.* from model where model.relation_id = 2 原因はto_iメソッド relation_idはinteger型なので、idがstring型…