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 -%>
    
261-280 / 500 show all
351minusQuia rerum est porro quod animi veritatis libero molestiae.No02 May 12:37Edit
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
200minusImpedit est velit veniam architecto.No21 May 12:37Edit
394minus facilisNulla repellat optio ea ut.No28 Mar 12:37Edit
35modiAnimi quod iste sunt.Yes16 Jun 12:37Edit
378modi iustoBeatae maxime corporis eum.No16 Jun 12:37Edit
270modi minusIllo voluptas eum dolorem accusantium deleniti aliquam.No04 May 12:37Edit
491modi nesciuntLaboriosam voluptatem sunt quod voluptatum magnam quisquam.No04 May 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
103molestiaeLaborum sapiente rerum sit.No08 Jun 12:37Edit
74molestiaeAd dolores occaecati fuga ratione praesentium quo.No22 May 12:37Edit
53molestiaeConsequatur explicabo quos unde esse a distinctio sapiente voluptas.No21 Apr 12:37Edit
210molestiaeCommodi soluta deleniti magni nisi error voluptas.No10 Jun 12:37Edit
6molestiae autemExplicabo aut ratione omnis voluptatem officia itaque dicta aut.Yes16 May 12:37Edit
243molestiae similiqueLabore et dolor architecto dolorum aut recusandae.No06 Apr 12:37Edit
178molestias voluptas quiIn tempora quam expedita officiis quod.No14 Apr 12:37Edit
140mollitiaEa pariatur eveniet omnis quae recusandae consectetur.No21 May 12:37Edit
238namDolor culpa laboriosam enim omnis ipsa.No10 Jun 12:37Edit
439namUnde eos dolore quis quo.No23 May 12:37Edit
469natus autemSed deleniti iste et eos magnam delectus in sequi.Yes10 Jun 12:37Edit

Fork me on GitHub