WiceGrid 3.6.0.pre4 examples

Most simple grid

The simplest grid is defined by the grid helper with column blocks inside for each column. The value of each column block is the contents of a cell.

  • # encoding: utf-8
    class Basics1Controller < ApplicationController
      def index
        @tasks_grid = initialize_grid(Task)
      end
    end
    
  • .well
      %h2= current_page_title
      %p
        The simplest grid is defined by the
        %code grid
        helper with column blocks inside  for each column.
        The value of each column block is the contents of a cell.
    
    = show_code
    
    .row-fluid
      .col-md-12
        = render   'grid'
  • <%= grid(@tasks_grid) do |g|
    
      g.column do |task|
        task.id
      end
    
      g.column  do |task|
        task.title
      end
    
      g.column do |task|
        task.description
      end
    
      g.column do |task|
        task.archived? ? 'Yes' : 'No'
      end
    
      g.column do |task|
        task.created_at.to_s(:short)
      end
    
      g.column do |task|
        link_to('Edit', edit_task_path(task))
      end
    end -%>
    
381-400 / 500 show all
89provident consequatur remSint at soluta earum.No30 Mar 12:37Edit
73iure architectoVoluptatum aperiam ad dolore aut fugit.No05 Apr 12:37Edit
217facere providentMagnam est quis sunt.No11 Jun 12:37Edit
463excepturiNobis doloribus eos aut voluptatem eaque.No18 Mar 12:37Edit
368magnamTempore voluptas vero molestiae commodi quo rem.No15 May 12:37Edit
17itaque suscipit commodiEt ut eveniet deleniti voluptatem omnis ea magnam et.No30 Mar 12:37Edit
51harum qui possimusNemo odio id ut quam praesentium esse.No26 Apr 12:37Edit
147adipisci ut asperioresSed sed ullam blanditiis aut consequatur mollitia ipsam et.No29 Mar 12:37Edit
42autEt eaque dignissimos magnam.No08 Apr 12:37Edit
441in autRatione quam eveniet corporis.No23 May 12:37Edit
134impedit voluptas eligendiIncidunt dolores sint amet dignissimos dolorum illum officiis dolorem.No10 May 12:37Edit
333omnisQuaerat laboriosam facere possimus cupiditate et.No20 Apr 12:37Edit
392velit vitaeVero tenetur ex et totam nam natus aperiam doloremque.No16 May 12:37Edit
332autem etDolorem qui qui repudiandae eveniet mollitia est exercitationem rerum.No15 Apr 12:37Edit
232eos quam doloremEt aspernatur voluptatem qui commodi esse.No18 Jun 12:37Edit
204error earum quiAb labore rerum quisquam rerum enim magni.No12 Apr 12:37Edit
22etReiciendis non officia aut omnis quia minima.No19 May 12:37Edit
345consequatur est sequiConsectetur libero quia ut dicta.No20 May 12:37Edit
260voluptates dolorem officiaSint quidem vel asperiores.No19 May 12:37Edit
445delectusOptio aut tempora mollitia corporis dicta temporibus eum vitae.No13 May 12:37Edit

Fork me on GitHub