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 -%>
    
481-500 / 500 show all
334sitVoluptatem consequatur sunt facilis debitis quia velit.No03 Apr 12:37Edit
11aspernatur estVoluptatem error inventore officia rem nemo qui.Yes24 Mar 12:37Edit
331consequuntur ipsa quiVoluptatem et quo fugiat sint dignissimos ut provident soluta.No15 Jun 12:37Edit
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
389utVoluptatem hic sapiente perspiciatis quos expedita et velit.No28 May 12:37Edit
283quamVoluptatem id dolore non.No13 Jun 12:37Edit
109sit amet fugiatVoluptatem nam dolores numquam quisquam.No03 Apr 12:37Edit
407similique voluptatumVoluptatem nesciunt quos omnis.No08 May 12:37Edit
166ut exVoluptatem qui aut et accusamus saepe eius laboriosam.No06 May 12:37Edit
410et qui sintVoluptatem recusandae dicta cumque vitae.No11 Apr 12:37Edit
437atVoluptatem rerum eos illo voluptatem labore autem consectetur consequatur.No03 Jun 12:37Edit
295itaque velitVoluptatem rerum non expedita illum et quod.No30 Apr 12:37Edit
110hicVoluptate quia quo sed.No11 May 12:37Edit
150qui remVoluptates deserunt non dolorem.No01 Jun 12:37Edit
449dolores sedVoluptatibus et excepturi molestiae.No05 Jun 12:37Edit
487natus etVoluptatibus mollitia corporis est numquam eum.No14 May 12:37Edit
257et nihilVoluptatibus sit et saepe eum harum et.No12 Mar 12:37Edit
73iure architectoVoluptatum aperiam ad dolore aut fugit.No05 Apr 12:37Edit
23exercitationem autVoluptatum aut earum at est deserunt.No23 Apr 12:37Edit
374voluptatem saepeVoluptatum dicta voluptatem ut laboriosam tempora consequuntur quam.No01 Apr 12:37Edit

Fork me on GitHub