Search code examples
rubyruby-on-rails-4wice-grid

Multiple links in a column using wice_grid Ruby On Rails


How to add multiple links to a column in wice_grid

g.column do |task|
    link_to('Edit', edit_task_path(task))
    link_to('Show', task_path(task))
end

Only a link is shown, other link is not even shown. Rails version 4.0.2


Solution

  • Try this

    g.column do |task|
        buffer = link_to('Edit', edit_task_path(task))
        buffer +=link_to('Show', task_path(task))
        raw buffer
    end