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 -%>
    
41-60 / 500 Sýna allt
16omnisPossimus voluptas tempore sed mollitia neque vero nesciunt.No21 Mar 12:37Edit
231quia quisCupiditate error facilis qui nobis modi hic.Yes21 Mar 12:37Edit
348inventore sedSuscipit occaecati et tempore similique voluptatem aut quae.No21 Mar 12:37Edit
411iureVelit error et fugiat fuga provident debitis expedita.No21 Mar 12:37Edit
13utEst voluptas impedit perferendis excepturi aliquid doloremque.No22 Mar 12:37Edit
335maximeNon beatae velit non est.No22 Mar 12:37Edit
59alias liberoRepudiandae praesentium aut nobis saepe.No23 Mar 12:37Edit
448tempore aliquam rationeQuam rerum tenetur aliquid.No23 Mar 12:37Edit
474possimusAut quia quia a et assumenda voluptas.No23 Mar 12:37Edit
11aspernatur estVoluptatem error inventore officia rem nemo qui.Yes24 Mar 12:37Edit
151ullam labore architectoFugit ut deserunt quia dolorem ut.No24 Mar 12:37Edit
220vero rerumEt aliquid id sed et.No24 Mar 12:37Edit
263nonFugit possimus ut aut.No24 Mar 12:37Edit
302eligendi velVel iste ea at sapiente eligendi inventore laudantium quas.No24 Mar 12:37Edit
336aut quis aspernaturAliquam fuga similique facilis accusamus reprehenderit.No24 Mar 12:37Edit
377quam qui quibusdamEa quia perferendis fuga dolore voluptatum vel vel.No24 Mar 12:37Edit
425nulla quoEius non asperiores adipisci non quo aspernatur.No24 Mar 12:37Edit
70autemSit ipsa aut qui quia voluptatem omnis.No25 Mar 12:37Edit
99solutaOfficiis omnis esse est debitis laboriosam.No25 Mar 12:37Edit
118hicDolores voluptatem nobis repudiandae consequatur fugiat autem voluptas.No25 Mar 12:37Edit

Fork me on GitHub