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'
81-100 / 500 show all
396at consequatur quaeratNostrum enim iusto architecto numquam.No29 Mar 12:37Edit
112neque quiAut ipsa aut accusamus quia consequatur ea facilis.No05 Apr 12:37Edit
388aspernatur dolores velIn velit quis optio exercitationem aspernatur et pariatur.No26 May 12:37Edit
483laborum dictaVeniam reiciendis laboriosam voluptas accusamus qui.No09 May 12:37Edit
468officiisUt a qui quod saepe unde excepturi.No07 Jun 12:37Edit
164beatae consecteturSimilique dolorem provident et accusantium aliquid inventore omnis.No07 Jun 12:37Edit
437atVoluptatem rerum eos illo voluptatem labore autem consectetur consequatur.No03 Jun 12:37Edit
444asperiores quisIure est soluta deserunt sunt.Yes09 Apr 12:37Edit
259suntEos recusandae ut provident voluptas consequatur enim.No18 May 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
167enimNon quaerat porro ut aspernatur placeat qui.No28 Mar 12:37Edit
30corrupti molestiae abRepellat ipsa quis quam alias dolores itaque.No29 Apr 12:37Edit
121dolore idDignissimos fugit amet nulla quis numquam sed explicabo.No15 Jun 12:37Edit
183iureFugiat sit unde quibusdam iste autem in.No14 Apr 12:37Edit
125nihil eum minusAsperiores soluta ut qui.No29 Apr 12:37Edit
5dicta pariaturCorporis iure repellat fuga omnis alias iusto aut voluptatum.No19 Apr 12:37Edit
401cum deserunt nesciuntMolestiae quasi totam voluptatem in esse dignissimos ut.Yes18 May 12:37Edit
320quo corrupti autSunt voluptatem corrupti est molestias id porro.No29 Apr 12:37Edit
74molestiaeAd dolores occaecati fuga ratione praesentium quo.No22 May 12:37Edit

Fork me on GitHub