ActiveRecordãæ¯ããæè¡ â Arelã¨ã¯ä½è ãªã®ã?(å ¨5å) ãã®4 #activerecord#Arel#rails#ruby#sql 2014å¹´ 05æ 06æ¥ nishio product = Arel::Table.new(:products) corporation = Arel::Table.new(:corporations) product_detail = Arel::Table.new(:product_details) product .project('*') .join(corporation) .on(product[:corporation_id].eq(corporation[:id])) .to_sql # "SELECT * FROM `products` # INNER JOIN `corporations` ON `products`
{{#tags}}- {{label}}
{{/tags}}