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 -%>
    
201-220 / 500 show all
201voluptasEt ut autem at ex voluptatibus assumenda.No16 Mar 12:37Edit
202beataeVel cupiditate quis autem.No08 May 12:37Edit
203soluta possimus estIllum ut molestiae et officia aut earum.No28 May 12:37Edit
204error earum quiAb labore rerum quisquam rerum enim magni.No12 Apr 12:37Edit
205velAut corrupti facere omnis officia.No15 May 12:37Edit
206quia ipsum maximeEum quia expedita quo quia.No12 Mar 12:37Edit
207sunt laborum cupiditateTempore laborum veniam non iure non minima.No13 Apr 12:37Edit
208officiaTemporibus nulla vero voluptatum repudiandae.No17 Apr 12:37Edit
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
210molestiaeCommodi soluta deleniti magni nisi error voluptas.No10 Jun 12:37Edit
211et dictaExpedita tempore numquam unde ut quaerat iure est.No22 Apr 12:37Edit
212quis veniamNam consequatur similique doloribus tempore tenetur recusandae ex.Yes14 Jun 12:37Edit
213quod reprehenderitIn ex fuga voluptas dolores accusamus architecto.No21 May 12:37Edit
214eumUt dolor qui dolore.No25 Apr 12:37Edit
215aliquid sed suntQuis sed voluptate voluptatibus voluptatem doloremque et.Yes12 May 12:37Edit
216nihil vitae eaNobis tenetur qui occaecati voluptas quibusdam.No22 Apr 12:37Edit
217facere providentMagnam est quis sunt.No11 Jun 12:37Edit
218quaerat sequiDeserunt et rem ut.No03 Apr 12:37Edit
219corrupti magni voluptatemFugit ut nihil quae quaerat qui.No05 May 12:37Edit
220vero rerumEt aliquid id sed et.No24 Mar 12:37Edit

Fork me on GitHub