ä¸ä½ã©ãããæå³ã§ã¤ãã£ãã®ãããããªããè¦ã¤ããã®ã§ã¡ã¢ãã¦ããæã¡æ¶ãã®è¨è¿°ãªãã¦å±éºããåãã§ãªããããããããã³ã¬ã¯è¦ããããé§é¤ããã»ããããç³»ã®ã¡ã½ããã ã¨ã¯æã£ã¦ããã ç°å¢ rails (5.2.0) ä¾ ä¾ãã°æ®éã«orderããã¨ä»¥ä¸ã®ããã«ã¯ã¨ãªãåãåºããã User.order(:id) # User Load (0.6ms) SELECT `users`.* FROM `users` ORDER BY `users`.`id` ASC è¤æ°æå®ããã¨ä»¥ä¸ã®ããã«éãã¦ORDER BYãããã User.order(:id).order(:updated_at) # User Load (5.2ms) SELECT `users`.* FROM `users` ORDER BY `users`.`id` ASC, `users`.`updated_at` ASC
{{#tags}}- {{label}}
{{/tags}}