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 -%>
    
161-180 / 500 show all
299consequaturExercitationem voluptatem sint ad.No14 Apr 12:37Edit
420rem nequeExpedita voluptatibus commodi dignissimos sed voluptatum modi voluptas.No14 Apr 12:37Edit
455etRerum unde adipisci praesentium ut dolore ea quia debitis.No14 Apr 12:37Edit
63accusamusPraesentium quod ipsum error odit.No15 Apr 12:37Edit
144est errorQui facere accusantium sint iusto quod consectetur dolores.No15 Apr 12:37Edit
153facilis utQui omnis beatae enim.No15 Apr 12:37Edit
332autem etDolorem qui qui repudiandae eveniet mollitia est exercitationem rerum.No15 Apr 12:37Edit
399rerum quaeUt quisquam molestiae at aut.No16 Apr 12:37Edit
500vel eaEt a ut cum eos sed.Yes16 Apr 12:37Edit
15est ut autVero distinctio voluptatem veritatis.No17 Apr 12:37Edit
208officiaTemporibus nulla vero voluptatum repudiandae.No17 Apr 12:37Edit
221sequiQuo nobis aut ut dolor perferendis odit.No17 Apr 12:37Edit
415voluptatemAccusantium mollitia dolorem nesciunt ipsa libero dolor.No17 Apr 12:37Edit
174ipsa quia voluptasQuod assumenda deleniti cupiditate soluta neque.No18 Apr 12:37Edit
304voluptatibus minimaEa exercitationem molestiae magni corrupti quis aperiam et repellat.No18 Apr 12:37Edit
343dolorem sit molestiasEaque exercitationem aut dolorem amet.No18 Apr 12:37Edit
393nihilAut non incidunt omnis assumenda.Yes18 Apr 12:37Edit
450distinctio aspernaturVel perspiciatis exercitationem dolorem ducimus.No18 Apr 12:37Edit
486enim harum minimaEum dolore ut natus.No18 Apr 12:37Edit
5dicta pariaturCorporis iure repellat fuga omnis alias iusto aut voluptatum.No19 Apr 12:37Edit

Fork me on GitHub