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 -%>
    
481-500 / 500 show all
39praesentium et idExpedita laborum incidunt natus.No08 May 12:37Edit
208officiaTemporibus nulla vero voluptatum repudiandae.No17 Apr 12:37Edit
4nisi quiQuas assumenda eos molestiae recusandae eveniet sit sint.No18 Mar 12:37Edit
460consequatur nemoVel minus voluptatem facere voluptatem sit.No10 Apr 12:37Edit
495qui ut inQuis ut eos a et.No21 Apr 12:37Edit
309architecto esse autNisi quam et amet dolorem in assumenda.No25 May 12:37Edit
306omnis voluptatem abProvident sapiente odio distinctio et harum vel.No13 May 12:37Edit
466autIllum corporis occaecati quia quo aut ratione voluptatem.No19 Mar 12:37Edit
250id culpa aliquidMagni possimus corrupti sed voluptatem earum harum ipsum.No04 Apr 12:37Edit
483laborum dictaVeniam reiciendis laboriosam voluptas accusamus qui.No09 May 12:37Edit
360similique estQuas porro qui nihil libero molestias omnis pariatur.No10 Jun 12:37Edit
348inventore sedSuscipit occaecati et tempore similique voluptatem aut quae.No21 Mar 12:37Edit
369reprehenderit rerumRepudiandae assumenda reprehenderit rerum voluptatibus sapiente.No15 Jun 12:37Edit
207sunt laborum cupiditateTempore laborum veniam non iure non minima.No13 Apr 12:37Edit
305dolorem harumAspernatur expedita accusantium quaerat fuga recusandae accusamus non.No19 Apr 12:37Edit
373commodiSit minima ab voluptas dolorem cumque.No13 Apr 12:37Edit
129voluptates minima molestiaeMolestias enim voluptatibus voluptatem aut.No03 May 12:37Edit
376assumendaBlanditiis tempora qui ut ex.No22 May 12:37Edit
25ab quiFugit id error esse.No29 May 12:37Edit
339quia doloremqueTemporibus quia esse omnis recusandae et consectetur est consequatur.No29 May 12:37Edit

Fork me on GitHub