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 Alle rijen tonen
6molestiae autemExplicabo aut ratione omnis voluptatem officia itaque dicta aut.Yes16 May 12:37Edit
7ut veniamMolestiae qui qui quo occaecati.No10 May 12:37Edit
9quisquam in isteEt fugiat blanditiis facilis asperiores et.No07 Jun 12:37Edit
13utEst voluptas impedit perferendis excepturi aliquid doloremque.No22 Mar 12:37Edit
14repellat consequatur velitError autem et deleniti nihil maxime voluptatem eius eveniet.No06 May 12:37Edit
20aspernatur eligendi adipisciMaiores perspiciatis tempore et aut sapiente eaque.No30 May 12:37Edit
27eum velUllam tenetur culpa error fugit sunt.No15 Mar 12:37Edit
29etEst nesciunt accusantium repudiandae est officia ipsa.No01 May 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
36placeatQuia aut eligendi aliquid.No13 Apr 12:37Edit
37etIncidunt eum consequatur qui et quis.No09 May 12:37Edit
42autEt eaque dignissimos magnam.No08 Apr 12:37Edit
44id temporibus eligendiId dignissimos dolorem enim ut.No27 Mar 12:37Edit
46facereEst nesciunt molestiae labore ut.Yes26 Apr 12:37Edit
47temporibus iure delectusCumque placeat aut vel repellat omnis accusamus error odio.No22 Apr 12:37Edit
49laborumFacere perferendis sapiente atque.No30 Apr 12:37Edit
54minima in voluptatemFacilis vitae et voluptatem similique quas dolore ipsam.No29 May 12:37Edit
59alias liberoRepudiandae praesentium aut nobis saepe.No23 Mar 12:37Edit

Fork me on GitHub