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
256saepeEarum facere omnis voluptatem dolor ad.No04 May 12:37Edit
257et nihilVoluptatibus sit et saepe eum harum et.No12 Mar 12:37Edit
258quia fugiatQuae vero fuga omnis at possimus cupiditate ut molestiae.No09 Jun 12:37Edit
259suntEos recusandae ut provident voluptas consequatur enim.No18 May 12:37Edit
260voluptates dolorem officiaSint quidem vel asperiores.No19 May 12:37Edit
261cumque voluptasQuod distinctio iusto quia quas voluptatem est.No05 Apr 12:37Edit
262eosQuia ea eos qui omnis odio et.No22 Apr 12:37Edit
263nonFugit possimus ut aut.No24 Mar 12:37Edit
264magnam laboriosamTemporibus laborum sapiente cupiditate sed porro consequuntur.No15 Jun 12:37Edit
265reprehenderit voluptasProvident explicabo exercitationem quia voluptates.No01 Apr 12:37Edit
266estEum quam et quia laudantium.No06 Jun 12:37Edit
267quoId exercitationem laudantium nemo amet.No14 Jun 12:37Edit
268quasi minima magniConsequuntur aspernatur eos cumque facere.No21 May 12:37Edit
269culpa assumendaOmnis voluptatem atque et mollitia a.No12 Mar 12:37Edit
270modi minusIllo voluptas eum dolorem accusantium deleniti aliquam.No04 May 12:37Edit
272fugit maiores consequaturQuasi velit amet iure blanditiis ipsam in qui.No19 May 12:37Edit
274eos sint ametVitae nihil et quos aliquam possimus porro qui.No19 Jun 12:37Edit
275voluptatumEsse magnam ut repellendus.No08 May 12:37Edit
276sedEa provident inventore minima quis.No26 Apr 12:37Edit
277magni officia inciduntEveniet magnam alias mollitia sit facere in deserunt autem.No13 Jun 12:37Edit

Fork me on GitHub