åå¿é²å ¼ãåå¿è åãã®ã¡ã½ããä¸è¦§ã ä½è£ãããã°Railsç·¨ã¨ããæ¸ããããªã ããå¿ãã¦ãã¨ãä½äº?ã¨ãããçªã£è¾¼ã¿ãããã°æ¯éãé¡ããã¾ãã ããã¡ãã£ã¨ã³ã¼ãã®å ·ä½ä¾æ¸ãããã£ããã©ãããã©ããããªã£ã¦ããw Array Array#combination(n), Array#permutation(n) é åã®ãã¼ã¿ãå ã«çµã¿åãã(é å)ãä½ã£ã¦ããã¾ãã ãããã¯ã渡ããªãå ´åã¯Enumeratorã§çµã¿åããã®åè¦ç´ ãåæãã¾ãã Enumerator Enumerator#with_index(offset = 0) Enumeratorã®åè¦ç´ ã«åããã¦indexãåæãã¦ãããEnumeratorãè¿ãã each_sliceãcombinationçã«ã¡ã½ãããã§ã¤ã³ã§ç¹ãã¦ä½¿ãã Enumerator#with_object(obj) with_indexã¨åæ§ã§
{{#tags}}- {{label}}
{{/tags}}