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 -%>
    
121-140 / 500 show all
78exercitationem sapienteQuasi numquam aut magnam expedita dolor repudiandae officiis.No07 Apr 12:37Edit
300minimaConsequatur nesciunt tempora asperiores quo ipsa repudiandae qui dolorem.Yes07 Apr 12:37Edit
496velit non pariaturQuia possimus rerum eum architecto.Yes07 Apr 12:37Edit
42autEt eaque dignissimos magnam.No08 Apr 12:37Edit
86adipisciConsectetur optio rerum facilis explicabo enim consequatur delectus iste.No08 Apr 12:37Edit
130esse rationeAliquid dolore aut magnam voluptatum ad.No08 Apr 12:37Edit
229omnis commodiArchitecto qui voluptatum vel et.No08 Apr 12:37Edit
327inventoreSaepe quos molestiae id non odio voluptate.No08 Apr 12:37Edit
353rerum nam eligendiUt qui omnis at ducimus id non perferendis qui.Yes08 Apr 12:37Edit
2ut sintAssumenda ut in commodi nihil ratione odio voluptatibus ea.No09 Apr 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
171qui est etEt temporibus sed maiores.No09 Apr 12:37Edit
444asperiores quisIure est soluta deserunt sunt.Yes09 Apr 12:37Edit
41estIpsum illo corrupti nesciunt facere.No10 Apr 12:37Edit
50ipsum nam temporeBlanditiis totam ab aut.No10 Apr 12:37Edit
252quasi etSunt atque in necessitatibus officia dolorum.No10 Apr 12:37Edit
349et similiqueDistinctio sunt ut doloribus adipisci rerum in.No10 Apr 12:37Edit
408quibusdam voluptatePerferendis sit rerum aliquam ullam et quia nemo.No10 Apr 12:37Edit
460consequatur nemoVel minus voluptatem facere voluptatem sit.No10 Apr 12:37Edit
135dignissimos idId iure vero quas nobis et quibusdam.No11 Apr 12:37Edit

Fork me on GitHub