ruby-on-railstrailblazer

Rails & Cells: render array inside view


Right now array inside cells render like a string. How I can render an array like array inside cell view?

def skill_options
  ["js", "ruby"]
end

call:

<%= skill_options %>

render:

array outside cell: ["js", "ruby"]

array inside cell: jsruby

Solution

  • call:

    <%= raw(skill_options) %>
    

    render array inside cell:

    array inside cell: ["js", "ruby"]