A ã¨ãããã§ã«ããããªã¡ã½ãããå®ç¾©ããã¦ããã¯ã©ã¹ããã£ã¦ããã®ä¸ã« foo ã£ã¦ããã¡ã½ããããã§ã«ãã£ãã¨ãã¾ããã§ããã® A ã¨ããã¯ã©ã¹ãç¶æ¿ãã B ã¨ããã¯ã©ã¹ãä½ã£ãã¨ãã¦ãã§ãããããã°ã©ã 㧠B ã®ã¤ã³ã¹ã¿ã³ã¹ãçæã㦠$b->can('foo') ã£ã¦ãã£ãã¨ãã ãçã«ãªããªã(ä»ã®ã¡ã½ãããå¼ã°ããã¨ãã¯çã«ãã)æ¹æ³ã£ã¦ãªããã¨ãããã¨ã§å
æ¥ id:nipotanã id:ikebe ã¨è©±ããã¦ããã¨ãããUNIVERSAL::can ãªããã®ãã¿ã¤ãããããã使ãã°ãããããã¨ã¯ã§ããã®ã§ã¯ã¨ãã話ã«ãªãã¾ããã UNIVERSAL::can ã¯ãªã«ããããããã¨ããã¨ãããã use ããã¯ã©ã¹ã« can ã¨ããã¡ã½ãããå®ç¾©ããã°ããã®ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã«å¯¾ã㦠$instance->can('hoge') ã£ã¦ããã¨ããã®ã¯ã©ã¹ã«å®ç¾©ãã can ã
{{#tags}}- {{label}}
{{/tags}}