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
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
215aliquid sed suntQuis sed voluptate voluptatibus voluptatem doloremque et.Yes12 May 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit
98aperiam rerumRerum quaerat eligendi voluptatem.Yes31 May 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
212quis veniamNam consequatur similique doloribus tempore tenetur recusandae ex.Yes14 Jun 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
65eosOccaecati atque assumenda qui deleniti.Yes21 Apr 12:37Edit
95quibusdam beatae adVoluptas aperiam beatae architecto provident cum.Yes05 May 12:37Edit
11aspernatur estVoluptatem error inventore officia rem nemo qui.Yes24 Mar 12:37Edit
6molestiae autemExplicabo aut ratione omnis voluptatem officia itaque dicta aut.Yes16 May 12:37Edit
111sit eaCulpa numquam dolorem corporis corrupti aliquam.Yes03 Jun 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
31debitis pariatur illoTemporibus velit id et porro dolor.Yes18 May 12:37Edit
35modiAnimi quod iste sunt.Yes16 Jun 12:37Edit
46facereEst nesciunt molestiae labore ut.Yes26 Apr 12:37Edit
19id rem eaIn odio quia laborum quam dicta nulla.Yes29 Mar 12:37Edit
231quia quisCupiditate error facilis qui nobis modi hic.Yes21 Mar 12:37Edit
230aliquid rerum modiFugit hic blanditiis esse alias.Yes23 Apr 12:37Edit

Fork me on GitHub