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
    
  • <%= 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 -%>
    
  • .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'
141-160 / 500 Sýna allt
40dolorSapiente voluptas aspernatur non nulla illo aperiam et.No10 May 12:37Edit
38minima doloribus sedEst ipsum aut quam libero dolorem praesentium ut repellendus.No08 May 12:37Edit
35modiAnimi quod iste sunt.Yes16 Jun 12:37Edit
497impedit quoQuod earum illum voluptatem.No11 Apr 12:37Edit
471illo ut evenietSed esse et sit qui iste odit sint ex.No01 Apr 12:37Edit
459et rerumExplicabo totam asperiores cupiditate ea dolore ipsam.No19 Jun 12:37Edit
451expedita nihilVoluptate maiores et sapiente.No04 Apr 12:37Edit
431vitae repudiandaeAliquid nihil aliquam architecto eos delectus placeat.No30 May 12:37Edit
408quibusdam voluptatePerferendis sit rerum aliquam ullam et quia nemo.No10 Apr 12:37Edit
404at aliquam corruptiVitae ut excepturi earum eum officia quidem repellat perspiciatis.No23 May 12:37Edit
383omnis vel delectusDolorem amet et et in iusto autem occaecati.No16 May 12:37Edit
375maxime laborumEt culpa accusantium animi.No21 May 12:37Edit
372possimus est maximeFugit et quo magnam soluta.No09 May 12:37Edit
369reprehenderit rerumRepudiandae assumenda reprehenderit rerum voluptatibus sapiente.No15 Jun 12:37Edit
368magnamTempore voluptas vero molestiae commodi quo rem.No15 May 12:37Edit
365eligendi delenitiNemo rerum aut non eos dolore in et ea.No16 Mar 12:37Edit
364nesciunt ullam nequeEt nulla reiciendis fugit odit nemo rem quo.No26 Mar 12:37Edit
359placeat molestiae officiisReiciendis soluta quo voluptas quod.No20 Mar 12:37Edit
325perferendis pariaturEst voluptas explicabo id consequatur autem et voluptatum nobis.No06 May 12:37Edit
315autemSapiente sit est laboriosam quo officiis ab.No14 Jun 12:37Edit

Fork me on GitHub