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 -%>
    
401-420 / 500 show all
401cum deserunt nesciuntMolestiae quasi totam voluptatem in esse dignissimos ut.Yes18 May 12:37Edit
402atReiciendis ut reprehenderit occaecati quia voluptatum error debitis.No01 Jun 12:37Edit
403et praesentium temporeAccusamus omnis odit in cumque soluta aliquam.No01 May 12:37Edit
404at aliquam corruptiVitae ut excepturi earum eum officia quidem repellat perspiciatis.No23 May 12:37Edit
405magni excepturiNon inventore non placeat incidunt cum.No31 May 12:37Edit
406sequi beataeSit velit consequuntur minus possimus.No26 Apr 12:37Edit
407similique voluptatumVoluptatem nesciunt quos omnis.No08 May 12:37Edit
408quibusdam voluptatePerferendis sit rerum aliquam ullam et quia nemo.No10 Apr 12:37Edit
409dolore etAut sequi veniam eius eveniet.No12 Mar 12:37Edit
410et qui sintVoluptatem recusandae dicta cumque vitae.No11 Apr 12:37Edit
411iureVelit error et fugiat fuga provident debitis expedita.No21 Mar 12:37Edit
412nonPerferendis consequatur error doloremque non voluptas sed aspernatur animi.No17 Mar 12:37Edit
413voluptateAnimi esse amet nihil ad nobis voluptatum.No25 Mar 12:37Edit
414quo architecto nonLaudantium iusto dolor facere vero provident sunt.Yes19 May 12:37Edit
415voluptatemAccusantium mollitia dolorem nesciunt ipsa libero dolor.No17 Apr 12:37Edit
416ipsamSit dolore accusantium maxime.Yes28 Apr 12:37Edit
417provident eumEos temporibus animi voluptate quia a aut vel.No26 May 12:37Edit
418cupiditate ut illumExpedita ut ut molestiae officia voluptatem.No27 May 12:37Edit
419voluptatem rerumOmnis eos labore nulla temporibus provident ratione sed excepturi.Yes21 Apr 12:37Edit
420rem nequeExpedita voluptatibus commodi dignissimos sed voluptatum modi voluptas.No14 Apr 12:37Edit

Fork me on GitHub