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 -%>
    
1-20 / 500 Alle rijen tonen
4nisi quiQuas assumenda eos molestiae recusandae eveniet sit sint.No18 Mar 12:37Edit
19id rem eaIn odio quia laborum quam dicta nulla.Yes29 Mar 12:37Edit
25ab quiFugit id error esse.No29 May 12:37Edit
39praesentium et idExpedita laborum incidunt natus.No08 May 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
56sitVoluptate enim perspiciatis nihil nisi necessitatibus quo dignissimos.No11 May 12:37Edit
72illum explicabo modiNesciunt exercitationem quisquam commodi ut.No16 Jun 12:37Edit
79animiCorporis est inventore nesciunt est nam voluptas et.No04 May 12:37Edit
95quibusdam beatae adVoluptas aperiam beatae architecto provident cum.Yes05 May 12:37Edit
96impedit explicabo voluptatemHic eveniet pariatur non nostrum.No02 Jun 12:37Edit
120esse voluptas deseruntFugit error sed id rem doloribus.No07 May 12:37Edit
123suscipit sunt deseruntDolores quasi minus fugiat reprehenderit et consequatur.No27 May 12:37Edit
129voluptates minima molestiaeMolestias enim voluptatibus voluptatem aut.No03 May 12:37Edit
161autCommodi delectus eaque quia occaecati molestiae voluptate ut qui.No19 Jun 12:37Edit
164beatae consecteturSimilique dolorem provident et accusantium aliquid inventore omnis.No07 Jun 12:37Edit
169vitae oditLaborum laboriosam odio cum ex.No07 Jun 12:37Edit
177ex perferendis velitSed qui sunt ut quod ex.No18 Mar 12:37Edit
183iureFugiat sit unde quibusdam iste autem in.No14 Apr 12:37Edit
192eumDoloribus sequi facere aut dolor sed quae quos.No19 Jun 12:37Edit
206quia ipsum maximeEum quia expedita quo quia.No12 Mar 12:37Edit

Fork me on GitHub