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 -%>
    
101-120 / 500 show all
449dolores sedVoluptatibus et excepturi molestiae.No05 Jun 12:37Edit
398dolores sitEt quae alias vitae sint autem eaque.No29 Mar 12:37Edit
323doloribusQuidem deleniti qui rerum est.No15 Jun 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
488doloribus veritatisMagni sunt illum deserunt impedit maiores natus.No17 Jun 12:37Edit
461dolor voluptasItaque quibusdam repellat in.No05 Jun 12:37Edit
198eaDolorum voluptates quae veniam porro repudiandae nam eos qui.No24 Apr 12:37Edit
199ea consectetur velitConsectetur fuga adipisci ad quia alias qui.No15 Jun 12:37Edit
328earumPossimus saepe sequi tenetur voluptatem eligendi adipisci repellendus.No26 Apr 12:37Edit
124earumReprehenderit nulla assumenda pariatur enim.No08 Jun 12:37Edit
365eligendi delenitiNemo rerum aut non eos dolore in et ea.No16 Mar 12:37Edit
302eligendi velVel iste ea at sapiente eligendi inventore laudantium quas.No24 Mar 12:37Edit
167enimNon quaerat porro ut aspernatur placeat qui.No28 Mar 12:37Edit
83enimUt molestias ducimus dignissimos.No14 Mar 12:37Edit
486enim harum minimaEum dolore ut natus.No18 Apr 12:37Edit
430enim itaqueEt consectetur et eos ut.No11 May 12:37Edit
101enim ullamTenetur nihil animi provident.No03 Jun 12:37Edit
381eosId quia ipsa laudantium.No12 May 12:37Edit
303eosInventore nulla ut voluptatum quisquam ipsa voluptatem iste et.No13 May 12:37Edit
262eosQuia ea eos qui omnis odio et.No22 Apr 12:37Edit

Fork me on GitHub