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
    
  • <%= 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 -%>
    
  • .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'
461-480 / 500 show all
432magni temporeOfficiis a quaerat quae natus est libero.No26 Mar 12:37Edit
433ut facereSit sapiente ducimus earum quia.No15 May 12:37Edit
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
208officiaTemporibus nulla vero voluptatum repudiandae.No17 Apr 12:37Edit
490maximeIncidunt ducimus iste illum inventore nostrum.No21 May 12:37Edit
206quia ipsum maximeEum quia expedita quo quia.No12 Mar 12:37Edit
54minima in voluptatemFacilis vitae et voluptatem similique quas dolore ipsam.No29 May 12:37Edit
205velAut corrupti facere omnis officia.No15 May 12:37Edit
319et voluptatemDicta vel deleniti quasi enim laudantium repudiandae est sint.No16 Mar 12:37Edit
320quo corrupti autSunt voluptatem corrupti est molestias id porro.No29 Apr 12:37Edit
204error earum quiAb labore rerum quisquam rerum enim magni.No12 Apr 12:37Edit
29etEst nesciunt accusantium repudiandae est officia ipsa.No01 May 12:37Edit
202beataeVel cupiditate quis autem.No08 May 12:37Edit
194quoQuis fugiat aperiam sapiente veniam provident odio inventore qui.No26 Mar 12:37Edit
437atVoluptatem rerum eos illo voluptatem labore autem consectetur consequatur.No03 Jun 12:37Edit
326similique maiores esseNobis minus nam fuga quia.No12 May 12:37Edit
192eumDoloribus sequi facere aut dolor sed quae quos.No19 Jun 12:37Edit
328earumPossimus saepe sequi tenetur voluptatem eligendi adipisci repellendus.No26 Apr 12:37Edit
438undePlaceat occaecati sunt at dolor quos aspernatur rerum voluptatem.No26 Apr 12:37Edit
190recusandae nisi doloribusPerspiciatis rerum nihil ea ipsum.No30 Mar 12:37Edit

Fork me on GitHub