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 -%>
    
101-120 / 500 show all
157rerumEum voluptatibus quis in.No12 Jun 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
145asperioresSit consectetur dignissimos blanditiis velit aperiam est ratione reprehenderit.No05 Jun 12:37Edit
142maxime accusamus consecteturSunt deleniti ex porro vel quod.No31 May 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
118hicDolores voluptatem nobis repudiandae consequatur fugiat autem voluptas.No25 Mar 12:37Edit
99solutaOfficiis omnis esse est debitis laboriosam.No25 Mar 12:37Edit
91quaeratFacere ullam veniam inventore ea.No08 Jun 12:37Edit
80corrupti officiaDolore odit consequatur dolores quia deleniti veniam.No12 Mar 12:37Edit
62eum velit saepeVoluptas voluptas nesciunt in eos eum inventore.No15 Mar 12:37Edit
61quia architectoRerum sit aliquid quia corrupti praesentium.No15 May 12:37Edit
53molestiaeConsequatur explicabo quos unde esse a distinctio sapiente voluptas.No21 Apr 12:37Edit
46facereEst nesciunt molestiae labore ut.Yes26 Apr 12:37Edit
44id temporibus eligendiId dignissimos dolorem enim ut.No27 Mar 12:37Edit
26quia mollitia delenitiFugit voluptatem recusandae soluta voluptatum consequuntur est voluptatem quas.No23 May 12:37Edit
20aspernatur eligendi adipisciMaiores perspiciatis tempore et aut sapiente eaque.No30 May 12:37Edit
16omnisPossimus voluptas tempore sed mollitia neque vero nesciunt.No21 Mar 12:37Edit
3aliquam repudiandaeConsequatur iste similique dolorum ducimus ut.No21 Mar 12:37Edit
2ut sintAssumenda ut in commodi nihil ratione odio voluptatibus ea.No09 Apr 12:37Edit
500vel eaEt a ut cum eos sed.Yes16 Apr 12:37Edit

Fork me on GitHub