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 -%>
    
361-380 / 500 Sýna allt
361culpaQuaerat sit tempore deleniti amet rerum unde sunt.No01 Apr 12:37Edit
362eum sapienteQuos adipisci dolorem vel numquam sint.No11 May 12:37Edit
363doloresMagni aliquid aperiam non delectus.No30 Apr 12:37Edit
364nesciunt ullam nequeEt nulla reiciendis fugit odit nemo rem quo.No26 Mar 12:37Edit
365eligendi delenitiNemo rerum aut non eos dolore in et ea.No16 Mar 12:37Edit
366debitis nihil quidemMolestiae est consequatur itaque est maiores vero.No06 May 12:37Edit
367similiqueNeque fuga recusandae expedita omnis et.Yes07 May 12:37Edit
368magnamTempore voluptas vero molestiae commodi quo rem.No15 May 12:37Edit
369reprehenderit rerumRepudiandae assumenda reprehenderit rerum voluptatibus sapiente.No15 Jun 12:37Edit
370accusantium error exercitationemMolestiae eos quibusdam quod id voluptatem eius.No25 Apr 12:37Edit
371id officiis doloremEnim earum cupiditate suscipit libero.No14 May 12:37Edit
372possimus est maximeFugit et quo magnam soluta.No09 May 12:37Edit
373commodiSit minima ab voluptas dolorem cumque.No13 Apr 12:37Edit
374voluptatem saepeVoluptatum dicta voluptatem ut laboriosam tempora consequuntur quam.No01 Apr 12:37Edit
375maxime laborumEt culpa accusantium animi.No21 May 12:37Edit
376assumendaBlanditiis tempora qui ut ex.No22 May 12:37Edit
377quam qui quibusdamEa quia perferendis fuga dolore voluptatum vel vel.No24 Mar 12:37Edit
378modi iustoBeatae maxime corporis eum.No16 Jun 12:37Edit
379vero repellatUt sed id deserunt.Yes13 Jun 12:37Edit
380qui repellendus sintUt quo voluptates sint.No11 May 12:37Edit

Fork me on GitHub