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 -%>
    
1-20 / 500 show all
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
287sint non dolorAb aut rerum ut sequi tenetur voluptate repellat non.No07 May 12:37Edit
204error earum quiAb labore rerum quisquam rerum enim magni.No12 Apr 12:37Edit
429ipsamAccusamus a vel suscipit facere officia doloribus.No30 Apr 12:37Edit
403et praesentium temporeAccusamus omnis odit in cumque soluta aliquam.No01 May 12:37Edit
452illum et voluptatemAccusamus quis quis sapiente distinctio aut et quaerat asperiores.Yes13 May 12:37Edit
294fugiat evenietAccusamus ut et nesciunt sit corrupti.No08 Jun 12:37Edit
415voluptatemAccusantium mollitia dolorem nesciunt ipsa libero dolor.No17 Apr 12:37Edit
74molestiaeAd dolores occaecati fuga ratione praesentium quo.No22 May 12:37Edit
69similique placeat ipsaAlias ratione autem ut impedit non nihil itaque eaque.No08 May 12:37Edit
336aut quis aspernaturAliquam fuga similique facilis accusamus reprehenderit.No24 Mar 12:37Edit
130esse rationeAliquid dolore aut magnam voluptatum ad.No08 Apr 12:37Edit
431vitae repudiandaeAliquid nihil aliquam architecto eos delectus placeat.No30 May 12:37Edit
321quis est autemAmet veniam quia molestias eum modi impedit rerum ad.No02 May 12:37Edit
413voluptateAnimi esse amet nihil ad nobis voluptatum.No25 Mar 12:37Edit
222voluptasAnimi odio ad et nisi quod perferendis natus possimus.No04 Jun 12:37Edit
35modiAnimi quod iste sunt.Yes16 Jun 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
229omnis commodiArchitecto qui voluptatum vel et.No08 Apr 12:37Edit

Fork me on GitHub