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 -%>
    
241-260 / 500 show all
36placeatQuia aut eligendi aliquid.No13 Apr 12:37Edit
243molestiae similiqueLabore et dolor architecto dolorum aut recusandae.No06 Apr 12:37Edit
439namUnde eos dolore quis quo.No23 May 12:37Edit
27eum velUllam tenetur culpa error fugit sunt.No15 Mar 12:37Edit
90commodi et quisConsequatur soluta eligendi et consequatur.No27 Apr 12:37Edit
380qui repellendus sintUt quo voluptates sint.No11 May 12:37Edit
280corporisVoluptate et necessitatibus distinctio et.No13 May 12:37Edit
484quiaMolestias ut reprehenderit ipsum quod corporis dolore debitis iste.No06 May 12:37Edit
128voluptasEst cum porro et et.No05 May 12:37Edit
181temporeCorporis rerum id possimus adipisci placeat omnis et.No09 May 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit
324natus dicta possimusEligendi et quis aut quasi voluptate tempore temporibus ut.No16 May 12:37Edit
307omnisCum ducimus rerum officiis nihil quam.No07 Jun 12:37Edit
53molestiaeConsequatur explicabo quos unde esse a distinctio sapiente voluptas.No21 Apr 12:37Edit
482consequuntur eumMaiores quo voluptatibus rerum ipsam consequatur.No01 May 12:37Edit
316at enim ullamUt minima dolor molestias ut.No12 Apr 12:37Edit
461dolor voluptasItaque quibusdam repellat in.No05 Jun 12:37Edit
37etIncidunt eum consequatur qui et quis.No09 May 12:37Edit
118hicDolores voluptatem nobis repudiandae consequatur fugiat autem voluptas.No25 Mar 12:37Edit
241blanditiis natusImpedit sit ea ut et.No15 Jun 12:37Edit

Fork me on GitHub