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'
281-300 / 500 show all
91quaeratFacere ullam veniam inventore ea.No08 Jun 12:37Edit
393nihilAut non incidunt omnis assumenda.Yes18 Apr 12:37Edit
78exercitationem sapienteQuasi numquam aut magnam expedita dolor repudiandae officiis.No07 Apr 12:37Edit
77sed quibusdam isteQuis non ducimus quia perferendis.No03 Jun 12:37Edit
499voluptatemMagnam accusantium id aut et quaerat praesentium eveniet.No09 May 12:37Edit
275voluptatumEsse magnam ut repellendus.No08 May 12:37Edit
11aspernatur estVoluptatem error inventore officia rem nemo qui.Yes24 Mar 12:37Edit
291odio fugit etCupiditate repudiandae corrupti sed culpa cumque vitae aut et.No16 Jun 12:37Edit
24voluptate culpaEt velit ut libero dolores.No01 Jun 12:37Edit
339quia doloremqueTemporibus quia esse omnis recusandae et consectetur est consequatur.No29 May 12:37Edit
475rerum perspiciatis eumSoluta non et temporibus.No20 Apr 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
169vitae oditLaborum laboriosam odio cum ex.No07 Jun 12:37Edit
293sed est estUllam dolores iste ut perspiciatis necessitatibus id illo.Yes22 Apr 12:37Edit
187quodVitae voluptates voluptas et aliquam aperiam eos.No31 Mar 12:37Edit
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
151ullam labore architectoFugit ut deserunt quia dolorem ut.No24 Mar 12:37Edit
244autem sintEarum quibusdam rerum amet quae laudantium.Yes14 Apr 12:37Edit
474possimusAut quia quia a et assumenda voluptas.No23 Mar 12:37Edit
371id officiis doloremEnim earum cupiditate suscipit libero.No14 May 12:37Edit

Fork me on GitHub