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'
41-60 / 500 Sýna allt
398dolores sitEt quae alias vitae sint autem eaque.No29 Mar 12:37Edit
449dolores sedVoluptatibus et excepturi molestiae.No05 Jun 12:37Edit
453omnisBlanditiis optio in inventore qui consequatur et.No19 Mar 12:37Edit
470et nonQuia eaque consequatur minima ut pariatur.No19 Jun 12:37Edit
29etEst nesciunt accusantium repudiandae est officia ipsa.No01 May 12:37Edit
66vitae at autemNihil quae dolores quia ut non.No06 May 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit
124earumReprehenderit nulla assumenda pariatur enim.No08 Jun 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
180cupiditate tenetur omnisRerum sed atque rem quos aliquid id.No17 Jun 12:37Edit
193idQuia voluptas sit aut sed maiores accusantium soluta.No15 May 12:37Edit
223laboriosam aut etEt possimus dicta hic sunt et itaque facilis.No11 Apr 12:37Edit
312repellendus perferendis vitaePariatur officia maxime libero ut vel dolor delectus.No17 May 12:37Edit
18necessitatibus commodiLabore dolor et cumque quos.No27 Mar 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
109sit amet fugiatVoluptatem nam dolores numquam quisquam.No03 Apr 12:37Edit
220vero rerumEt aliquid id sed et.No24 Mar 12:37Edit
296cupiditate in minimaSit aspernatur tempore id.Yes02 May 12:37Edit
364nesciunt ullam nequeEt nulla reiciendis fugit odit nemo rem quo.No26 Mar 12:37Edit
247eum temporeDignissimos cumque rem dolores voluptatem numquam omnis unde autem.No09 Jun 12:37Edit

Fork me on GitHub