Arelã¨ã¯ SQLãçæããã©ã¤ãã©ãªã¼ã§ãActiveRecordãSQLãçæããéã«å é¨çã«ä½¿ããã¦ãã¾ãã æ®æ®µã¯ãã¾ã表ã«åºã¦ããªãã©ã¤ãã©ãªã¼ã§ããArelã使ãããªããããã«ãªãã¨è¤éãªSQLãæååã¨ãã¦å®è£ ããªãã¦è¯ããªããããActiveRecordã®çæããSQLã¨è¦ªåæ§ã®é«ãSQLãçµã¿ç«ã¦ãããããã«ãªãã¾ãã Arelã使ããªãããããå®è£ 以ä¸ã®ããã«å¦çã®è©¦é¨çµæã管çãã Examã¢ãã«(examsãã¼ãã«)ãããã¾ãã試é¨ã¯100ç¹æºç¹ã§60ç¹ä»¥ä¸ãåæ ¼ã¨ãªãã¾ã # t.bigint "student_id", null: false # t.integer "score", null: false class Exam < ApplicationRecord belongs_to :student scope :pass, -> { where('
{{#tags}}- {{label}}
{{/tags}}