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 Alle rijen tonen
14repellat consequatur velitError autem et deleniti nihil maxime voluptatem eius eveniet.No06 May 12:37Edit
15est ut autVero distinctio voluptatem veritatis.No17 Apr 12:37Edit
36placeatQuia aut eligendi aliquid.No13 Apr 12:37Edit
49laborumFacere perferendis sapiente atque.No30 Apr 12:37Edit
63accusamusPraesentium quod ipsum error odit.No15 Apr 12:37Edit
64reiciendisQuaerat voluptatum nihil iure.No30 Mar 12:37Edit
76totamDistinctio et pariatur non est consequatur enim.No31 Mar 12:37Edit
77sed quibusdam isteQuis non ducimus quia perferendis.No03 Jun 12:37Edit
94officiisIllum minus rerum expedita.No01 Apr 12:37Edit
101enim ullamTenetur nihil animi provident.No03 Jun 12:37Edit
102inventore eligendi voluptasOdio autem at officia tempora labore.No11 Jun 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
111sit eaCulpa numquam dolorem corporis corrupti aliquam.Yes03 Jun 12:37Edit
117fugitSunt ab optio illo voluptatem adipisci omnis ut earum.No02 Apr 12:37Edit
121dolore idDignissimos fugit amet nulla quis numquam sed explicabo.No15 Jun 12:37Edit
126qui voluptatum atqueVeniam ut eaque commodi sint esse.No06 Apr 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
140mollitiaEa pariatur eveniet omnis quae recusandae consectetur.No21 May 12:37Edit
147adipisci ut asperioresSed sed ullam blanditiis aut consequatur mollitia ipsam et.No29 Mar 12:37Edit
150qui remVoluptates deserunt non dolorem.No01 Jun 12:37Edit

Fork me on GitHub