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
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
194quoQuis fugiat aperiam sapiente veniam provident odio inventore qui.No26 Mar 12:37Edit
200minusImpedit est velit veniam architecto.No21 May 12:37Edit
212quis veniamNam consequatur similique doloribus tempore tenetur recusandae ex.Yes14 Jun 12:37Edit
241blanditiis natusImpedit sit ea ut et.No15 Jun 12:37Edit
248quiMinus quia cumque est deleniti.Yes30 Mar 12:37Edit
249sint itaqueNeque cum vero laborum voluptatem aliquam velit quaerat voluptatem.Yes16 Jun 12:37Edit
252quasi etSunt atque in necessitatibus officia dolorum.No10 Apr 12:37Edit
253quosAut fuga qui excepturi ut tempora dolor voluptatem.Yes26 May 12:37Edit
254ex estIpsa enim provident quia.Yes10 Jun 12:37Edit
260voluptates dolorem officiaSint quidem vel asperiores.No19 May 12:37Edit
274eos sint ametVitae nihil et quos aliquam possimus porro qui.No19 Jun 12:37Edit
287sint non dolorAb aut rerum ut sequi tenetur voluptate repellat non.No07 May 12:37Edit
289quasiQui est mollitia minus tempore eaque perferendis non.No31 May 12:37Edit
298iusto quae ipsamEa nihil vel ea.No10 May 12:37Edit
304voluptatibus minimaEa exercitationem molestiae magni corrupti quis aperiam et repellat.No18 Apr 12:37Edit
307omnisCum ducimus rerum officiis nihil quam.No07 Jun 12:37Edit
313impeditOptio repellat sapiente est excepturi.No29 May 12:37Edit
315autemSapiente sit est laboriosam quo officiis ab.No14 Jun 12:37Edit
316at enim ullamUt minima dolor molestias ut.No12 Apr 12:37Edit

Fork me on GitHub