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'
21-40 / 500 Sýna allt
21et rerum laborumVelit consequatur quas sunt perspiciatis quae nihil.No19 Mar 12:37Edit
22etReiciendis non officia aut omnis quia minima.No19 May 12:37Edit
23exercitationem autVoluptatum aut earum at est deserunt.No23 Apr 12:37Edit
24voluptate culpaEt velit ut libero dolores.No01 Jun 12:37Edit
25ab quiFugit id error esse.No29 May 12:37Edit
26quia mollitia delenitiFugit voluptatem recusandae soluta voluptatum consequuntur est voluptatem quas.No23 May 12:37Edit
27eum velUllam tenetur culpa error fugit sunt.No15 Mar 12:37Edit
28laborum enim voluptasDignissimos sed laudantium in consequatur quaerat molestias optio maxime.No05 May 12:37Edit
29etEst nesciunt accusantium repudiandae est officia ipsa.No01 May 12:37Edit
30corrupti molestiae abRepellat ipsa quis quam alias dolores itaque.No29 Apr 12:37Edit
31debitis pariatur illoTemporibus velit id et porro dolor.Yes18 May 12:37Edit
32voluptatem ipsam liberoBlanditiis omnis enim voluptas fugit molestiae.No07 Jun 12:37Edit
33voluptatemDolorem saepe et aspernatur.No04 May 12:37Edit
34illo voluptasEsse et fuga voluptate eveniet qui.No14 Jun 12:37Edit
35modiAnimi quod iste sunt.Yes16 Jun 12:37Edit
36placeatQuia aut eligendi aliquid.No13 Apr 12:37Edit
37etIncidunt eum consequatur qui et quis.No09 May 12:37Edit
38minima doloribus sedEst ipsum aut quam libero dolorem praesentium ut repellendus.No08 May 12:37Edit
39praesentium et idExpedita laborum incidunt natus.No08 May 12:37Edit
40dolorSapiente voluptas aspernatur non nulla illo aperiam et.No10 May 12:37Edit

Fork me on GitHub