主キーを全て取得
説明
主キーを全て取得
使い方
モデル.ids()
例
主キーを全て取得
Person.ids
# SELECT people.id FROM people
JOIN
Person.joins(:companies).ids
# SELECT people.id FROM people INNER JOIN companies ON companies.person_id = people.id
主キーを全て取得
モデル.ids()
Person.ids
# SELECT people.id FROM people
Person.joins(:companies).ids
# SELECT people.id FROM people INNER JOIN companies ON companies.person_id = people.id