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 -%>
    
381-400 / 500 Sýna allt
365eligendi delenitiNemo rerum aut non eos dolore in et ea.No16 Mar 12:37Edit
366debitis nihil quidemMolestiae est consequatur itaque est maiores vero.No06 May 12:37Edit
368magnamTempore voluptas vero molestiae commodi quo rem.No15 May 12:37Edit
369reprehenderit rerumRepudiandae assumenda reprehenderit rerum voluptatibus sapiente.No15 Jun 12:37Edit
370accusantium error exercitationemMolestiae eos quibusdam quod id voluptatem eius.No25 Apr 12:37Edit
371id officiis doloremEnim earum cupiditate suscipit libero.No14 May 12:37Edit
372possimus est maximeFugit et quo magnam soluta.No09 May 12:37Edit
373commodiSit minima ab voluptas dolorem cumque.No13 Apr 12:37Edit
374voluptatem saepeVoluptatum dicta voluptatem ut laboriosam tempora consequuntur quam.No01 Apr 12:37Edit
375maxime laborumEt culpa accusantium animi.No21 May 12:37Edit
1impedit aperiam liberoEst necessitatibus tempora ut.No22 May 12:37Edit
377quam qui quibusdamEa quia perferendis fuga dolore voluptatum vel vel.No24 Mar 12:37Edit
378modi iustoBeatae maxime corporis eum.No16 Jun 12:37Edit
380qui repellendus sintUt quo voluptates sint.No11 May 12:37Edit
381eosId quia ipsa laudantium.No12 May 12:37Edit
382vel nostrumMaiores officiis sequi aut at quia.No14 Jun 12:37Edit
383omnis vel delectusDolorem amet et et in iusto autem occaecati.No16 May 12:37Edit
384quiaNihil voluptas unde voluptas nobis.No27 May 12:37Edit
385et teneturDelectus consectetur vitae dicta eveniet.No13 Apr 12:37Edit
386eveniet ipsam etExpedita maiores natus ab voluptatem nesciunt.No28 Mar 12:37Edit

Fork me on GitHub