Hide columns from a table in a view
In my index view of a resource I have a table over multiple columns. The table rows get filled via each-do method. Id like to hide columns from the table to view only one column, so that I can easily mark all rows to copy them. Should I just setup a link to a new page on my开发者_如何学C resource (produce a new action and view) or is there another way?
You could pass something like :hide => true in your params for the request, then display the columns unless params[:hide].
You could also do it entirely on the client side by using javascript to hide/show divs when clicked.
精彩评论