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
    
  • <%= 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 -%>
    
  • .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'
21-40 / 500 show all
75velit non magniTotam dolor est sint et sed.No07 May 12:37Edit
77sed quibusdam isteQuis non ducimus quia perferendis.No03 Jun 12:37Edit
78exercitationem sapienteQuasi numquam aut magnam expedita dolor repudiandae officiis.No07 Apr 12:37Edit
81ad quo dolorTempora culpa laborum et illum suscipit facilis earum et.No05 May 12:37Edit
82utEt debitis enim repellat qui voluptatem a nam nisi.No04 Jun 12:37Edit
83enimUt molestias ducimus dignissimos.No14 Mar 12:37Edit
87nostrumTempore ad qui velit nihil ipsam.No13 Jun 12:37Edit
88culpaOccaecati aut eum vero quasi dolorem.No25 May 12:37Edit
90commodi et quisConsequatur soluta eligendi et consequatur.No27 Apr 12:37Edit
91quaeratFacere ullam veniam inventore ea.No08 Jun 12:37Edit
95quibusdam beatae adVoluptas aperiam beatae architecto provident cum.Yes05 May 12:37Edit
97voluptatem facilis etIncidunt dolorem molestias deserunt repellat vero aut.No15 Mar 12:37Edit
99solutaOfficiis omnis esse est debitis laboriosam.No25 Mar 12:37Edit
101enim ullamTenetur nihil animi provident.No03 Jun 12:37Edit
102inventore eligendi voluptasOdio autem at officia tempora labore.No11 Jun 12:37Edit
103molestiaeLaborum sapiente rerum sit.No08 Jun 12:37Edit
106laboriosam enimVel laborum similique est voluptatem dolor cupiditate.No18 Jun 12:37Edit
107utInventore saepe voluptatibus voluptas dignissimos omnis molestias quisquam.No02 Apr 12:37Edit
108maximeItaque nisi fugiat et molestiae dolorem voluptas.No21 May 12:37Edit
109sit amet fugiatVoluptatem nam dolores numquam quisquam.No03 Apr 12:37Edit

Fork me on GitHub