Google+ãã¿ã³ ã¯ã¦ãªããã¯ãã¼ã¯ãã¿ã³ æ´æ°æ¥æ: 2016å¹´12æ26æ¥ï¼æï¼ ä½ææ¥æ: 2016å¹´12æ26æ¥ï¼æï¼ åã®è¨äº / 次ã®è¨äº ä»æ´to_partial_pathã®åå¨ã«æ°ä»ããã®ã§ã¡ã¢ã åè Rendering Collections in Rails ãã¼ã·ã£ã«ã render @foos ã§å¼ã³åºã㨠@foos ã®æ§æè¦ç´ ã®ã¤ã³ã¹ã¿ã³ã¹ã®ã¯ã©ã¹ãå¥ã ãªã¨ããããããã«ããã ActiveRecordã®ã¤ã³ã¹ã¿ã³ã¹ã«ã¯ to_partial_path ã¨ããã¡ã½ãããããã èªãã§åã®å¦ããã®ã¤ã³ã¹ã¿ã³ã¹ãã¬ã³ããªã³ã°ããããã®ãã¼ã·ã£ã«ã®å¨å¦ãå¾ããã¨ãã§ããã ä¾ãã°ã class User < ApplicationRecord end User.new.to_partial_path #=> "users/user" ãã®ã¡ã½ããããªã¼ãã¼ã©ã¤ã
{{#tags}}- {{label}}
{{/tags}}