开发者

Hide columns from a table in a view

开发者 https://www.devze.com 2023-02-14 12:51 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消