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 -%>
    
1-20 / 500 show all
325perferendis pariaturEst voluptas explicabo id consequatur autem et voluptatum nobis.No06 May 12:37Edit
414quo architecto nonLaudantium iusto dolor facere vero provident sunt.Yes19 May 12:37Edit
352autemUt provident voluptates dolor.No12 Jun 12:37Edit
171qui est etEt temporibus sed maiores.No09 Apr 12:37Edit
253quosAut fuga qui excepturi ut tempora dolor voluptatem.Yes26 May 12:37Edit
59alias liberoRepudiandae praesentium aut nobis saepe.No23 Mar 12:37Edit
206quia ipsum maximeEum quia expedita quo quia.No12 Mar 12:37Edit
14repellat consequatur velitError autem et deleniti nihil maxime voluptatem eius eveniet.No06 May 12:37Edit
366debitis nihil quidemMolestiae est consequatur itaque est maiores vero.No06 May 12:37Edit
110hicVoluptate quia quo sed.No11 May 12:37Edit
454similique enim odioEa cupiditate sit ex aut laudantium voluptatem.No14 Mar 12:37Edit
178molestias voluptas quiIn tempora quam expedita officiis quod.No14 Apr 12:37Edit
194quoQuis fugiat aperiam sapiente veniam provident odio inventore qui.No26 Mar 12:37Edit
353rerum nam eligendiUt qui omnis at ducimus id non perferendis qui.Yes08 Apr 12:37Edit
82utEt debitis enim repellat qui voluptatem a nam nisi.No04 Jun 12:37Edit
417provident eumEos temporibus animi voluptate quia a aut vel.No26 May 12:37Edit
424non autem solutaConsectetur omnis excepturi cum vitae.No01 Jun 12:37Edit
290voluptasIste aut occaecati quo voluptates facere consequatur.No02 Jun 12:37Edit
211et dictaExpedita tempore numquam unde ut quaerat iure est.No22 Apr 12:37Edit
222voluptasAnimi odio ad et nisi quod perferendis natus possimus.No04 Jun 12:37Edit

Fork me on GitHub