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 -%>
    
141-160 / 500 show all
213quod reprehenderitIn ex fuga voluptas dolores accusamus architecto.No21 May 12:37Edit
217facere providentMagnam est quis sunt.No11 Jun 12:37Edit
225beatae porroAut mollitia et ut.No22 Apr 12:37Edit
237vel esseDistinctio accusamus et dolores aliquam repudiandae omnis.No04 Jun 12:37Edit
238namDolor culpa laboriosam enim omnis ipsa.No10 Jun 12:37Edit
248quiMinus quia cumque est deleniti.Yes30 Mar 12:37Edit
266estEum quam et quia laudantium.No06 Jun 12:37Edit
276sedEa provident inventore minima quis.No26 Apr 12:37Edit
317nulla perspiciatis sapienteDolor voluptatibus aut ipsa ad ut.No07 Jun 12:37Edit
319et voluptatemDicta vel deleniti quasi enim laudantium repudiandae est sint.No16 Mar 12:37Edit
329iusto sit rerumIste placeat voluptas possimus ut quasi optio.No31 May 12:37Edit
333omnisQuaerat laboriosam facere possimus cupiditate et.No20 Apr 12:37Edit
346adipisci at nesciuntEligendi facilis ut consequatur.No18 Jun 12:37Edit
367similiqueNeque fuga recusandae expedita omnis et.Yes07 May 12:37Edit
382vel nostrumMaiores officiis sequi aut at quia.No14 Jun 12:37Edit
384quiaNihil voluptas unde voluptas nobis.No27 May 12:37Edit
385et teneturDelectus consectetur vitae dicta eveniet.No13 Apr 12:37Edit
393nihilAut non incidunt omnis assumenda.Yes18 Apr 12:37Edit
395quia nobis quidemQuia quis repellendus eos adipisci.No24 May 12:37Edit
410et qui sintVoluptatem recusandae dicta cumque vitae.No11 Apr 12:37Edit

Fork me on GitHub