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 -%>
    
41-60 / 500 show all
41estIpsum illo corrupti nesciunt facere.No10 Apr 12:37Edit
42autEt eaque dignissimos magnam.No08 Apr 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
44id temporibus eligendiId dignissimos dolorem enim ut.No27 Mar 12:37Edit
45rerumRepellat et ut eos ea illo et dolorum voluptatem.No15 Jun 12:37Edit
46facereEst nesciunt molestiae labore ut.Yes26 Apr 12:37Edit
47temporibus iure delectusCumque placeat aut vel repellat omnis accusamus error odio.No22 Apr 12:37Edit
48qui inciduntDignissimos harum ut ea veritatis ut.No04 Apr 12:37Edit
49laborumFacere perferendis sapiente atque.No30 Apr 12:37Edit
50ipsum nam temporeBlanditiis totam ab aut.No10 Apr 12:37Edit
51harum qui possimusNemo odio id ut quam praesentium esse.No26 Apr 12:37Edit
52eos temporibus omnisSapiente accusamus recusandae sunt animi voluptates dolorem enim.No13 Mar 12:37Edit
53molestiaeConsequatur explicabo quos unde esse a distinctio sapiente voluptas.No21 Apr 12:37Edit
54minima in voluptatemFacilis vitae et voluptatem similique quas dolore ipsam.No29 May 12:37Edit
55dolorError odio possimus labore.No11 Jun 12:37Edit
56sitVoluptate enim perspiciatis nihil nisi necessitatibus quo dignissimos.No11 May 12:37Edit
57nequeNisi mollitia ipsam autem est voluptas consequatur expedita.No19 Mar 12:37Edit
58atque etEst alias est non debitis omnis voluptatem.No28 May 12:37Edit
59alias liberoRepudiandae praesentium aut nobis saepe.No23 Mar 12:37Edit
60voluptas repellendusTempora suscipit quibusdam rerum expedita aut.No02 Jun 12:37Edit

Fork me on GitHub