æ¦è¦ å ãµã¤ãã®è¨±è«¾ãå¾ã¦ç¿»è¨³ã»å ¬éãããã¾ãã è±èªè¨äº: Conditionally Add CSS Classes to Your Views and Components | Rails Designer åæå ¬éæ¥: 2024/03/94 åèè : Rails Designer -- Railsããã³ãã¨ã³ãé¢é£è¨äºã«å ãã¦ãViewComponentã¨Tailwind CSSãç¨ããç¾ããUIã³ã³ãã¼ãã³ãã販売ãã¦ãã¾ã æ¥æ¬èªã¿ã¤ãã«ã¯å 容ã«å³ãããã®ã«ãã¾ããã Rails 6.1ã§ãªãªã¼ã¹ããã class_namesï¼#37918ï¼ã¯ãç§ãå¤ç¨ãã¦ãããã¥ã¼ãã«ãã¼ã§ãã class_namesããªãã£ãé ã¯ã以ä¸ã®ãããªèªã¿ã«ããã³ã¼ããæ¸ãããããã¾ããã§ããã <div class="<â %= item.for_sale? ? 'active' : '' %>"
{{#tags}}- {{label}}
{{/tags}}