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 -%>
    
21-40 / 500 show all
424non autem solutaConsectetur omnis excepturi cum vitae.No01 Jun 12:37Edit
421reiciendis dolorum quodDoloremque alias quis reiciendis dicta ipsa libero doloribus rerum.Yes11 Apr 12:37Edit
419voluptatem rerumOmnis eos labore nulla temporibus provident ratione sed excepturi.Yes21 Apr 12:37Edit
416ipsamSit dolore accusantium maxime.Yes28 Apr 12:37Edit
415voluptatemAccusantium mollitia dolorem nesciunt ipsa libero dolor.No17 Apr 12:37Edit
411iureVelit error et fugiat fuga provident debitis expedita.No21 Mar 12:37Edit
410et qui sintVoluptatem recusandae dicta cumque vitae.No11 Apr 12:37Edit
405magni excepturiNon inventore non placeat incidunt cum.No31 May 12:37Edit
400et voluptatibusQui aliquam et quia.No23 Apr 12:37Edit
398dolores sitEt quae alias vitae sint autem eaque.No29 Mar 12:37Edit
388aspernatur dolores velIn velit quis optio exercitationem aspernatur et pariatur.No26 May 12:37Edit
384quiaNihil voluptas unde voluptas nobis.No27 May 12:37Edit
382vel nostrumMaiores officiis sequi aut at quia.No14 Jun 12:37Edit
381eosId quia ipsa laudantium.No12 May 12:37Edit
380qui repellendus sintUt quo voluptates sint.No11 May 12:37Edit
377quam qui quibusdamEa quia perferendis fuga dolore voluptatum vel vel.No24 Mar 12:37Edit
374voluptatem saepeVoluptatum dicta voluptatem ut laboriosam tempora consequuntur quam.No01 Apr 12:37Edit
370accusantium error exercitationemMolestiae eos quibusdam quod id voluptatem eius.No25 Apr 12:37Edit
361culpaQuaerat sit tempore deleniti amet rerum unde sunt.No01 Apr 12:37Edit
360similique estQuas porro qui nihil libero molestias omnis pariatur.No10 Jun 12:37Edit

Fork me on GitHub