æ¦è¦ åèè ã®è¨±è«¾ãå¾ã¦ç¿»è¨³ã»å ¬éãããã¾ãã è±èªè¨äº: A scope should return a scope - Andy Croll åæå ¬éæ¥: 2018/10/14 èè : Andy Croll Railsã¢ããªãã³ã¼ãã£ã³ã°ãã¦ãã¦Railsã¨ããã¬ã¼ã«ã«ä¹ã£ã¦ããæéãé·ããªãã°ãªãã»ã©ãã¢ããªã楽ã«ã¡ã³ãã§ããããã«ãªããã¤ããã軽æ¸ããã¾ãã ã¬ã¼ã«ã«ä¹ãããæ¹æ³ã®1ã¤ã¯ãæ¨æºã®Rails APIã®ãã¿ã¼ã³ã«æ²¿ã£ã¦é²ãããã¨ã§ãããããã£ã¦é²ããã¨ãã«èªåãå°ãã¦ããããã¿ã¼ã³ã®1ã¤ãããã使ãããã¯ã¨ãªãã¹ã³ã¼ãåãããã¨ã§ãã 次ã®ããã«æ¸ãã®ã§ã¯ãªã ã¹ã³ã¼ãå ã§ãªãã¸ã§ã¯ãã1ã¤è¿ãã¡ã½ãããæ¸ãã class Message < ActiveRecord scope :sent, -> { where.not(sent_at: nil) } scope :
{{#tags}}- {{label}}
{{/tags}}