Search code examples
ruby-on-railsruby

Using %i and %I symbol array literal


Reading through a list of Rails questions, I'm having trouble finding what the %i does in relation to a symbol array. Does this mean anything to anyone?


Solution

  • I'm having trouble finding what the %i does in relation to a symbol array.

    It is an array literal for an array of symbols. It does the same thing in relation to symbol arrays as ' does to strings.