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 -%>
    
361-380 / 500 Sýna allt
162quia nihil laboreDolor vitae perspiciatis error occaecati accusamus aperiam.No19 Apr 12:37Edit
395quia nobis quidemQuia quis repellendus eos adipisci.No24 May 12:37Edit
231quia quisCupiditate error facilis qui nobis modi hic.Yes21 Mar 12:37Edit
95quibusdam beatae adVoluptas aperiam beatae architecto provident cum.Yes05 May 12:37Edit
358quibusdam consequunturAut animi debitis dicta voluptate itaque perferendis praesentium.No31 Mar 12:37Edit
408quibusdam voluptatePerferendis sit rerum aliquam ullam et quia nemo.No10 Apr 12:37Edit
234quidem corporisAut velit earum velit assumenda.No09 Jun 12:37Edit
322qui doloresQuia rem qui unde eum et tempora.No31 Mar 12:37Edit
171qui est etEt temporibus sed maiores.No09 Apr 12:37Edit
48qui inciduntDignissimos harum ut ea veritatis ut.No04 Apr 12:37Edit
150qui remVoluptates deserunt non dolorem.No01 Jun 12:37Edit
380qui repellendus sintUt quo voluptates sint.No11 May 12:37Edit
458quisUt corrupti consequatur iste.No03 May 12:37Edit
191quis aut architectoNatus molestiae inventore voluptatem.No30 Apr 12:37Edit
321quis est autemAmet veniam quia molestias eum modi impedit rerum ad.No02 May 12:37Edit
310quis modiFacere quia molestiae eos.No28 Mar 12:37Edit
9quisquam in isteEt fugiat blanditiis facilis asperiores et.No07 Jun 12:37Edit
255qui suscipitRerum quia itaque amet eum veniam aut ad.No24 Apr 12:37Edit
212quis veniamNam consequatur similique doloribus tempore tenetur recusandae ex.Yes14 Jun 12:37Edit
495qui ut inQuis ut eos a et.No21 Apr 12:37Edit

Fork me on GitHub