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 -%>
    
481-500 / 500 Sýna allt
397tempore ut aliquidLaudantium labore perferendis ut doloremque.Yes05 Jun 12:37Edit
421reiciendis dolorum quodDoloremque alias quis reiciendis dicta ipsa libero doloribus rerum.Yes11 Apr 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit
293sed est estUllam dolores iste ut perspiciatis necessitatibus id illo.Yes22 Apr 12:37Edit
353rerum nam eligendiUt qui omnis at ducimus id non perferendis qui.Yes08 Apr 12:37Edit
500vel eaEt a ut cum eos sed.Yes16 Apr 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
271etNatus deserunt quibusdam rerum.Yes19 May 12:37Edit
296cupiditate in minimaSit aspernatur tempore id.Yes02 May 12:37Edit
46facereEst nesciunt molestiae labore ut.Yes26 Apr 12:37Edit
273veroMinima eum dicta odio a quod odit rerum.Yes11 May 12:37Edit
244autem sintEarum quibusdam rerum amet quae laudantium.Yes14 Apr 12:37Edit
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
444asperiores quisIure est soluta deserunt sunt.Yes09 Apr 12:37Edit
95quibusdam beatae adVoluptas aperiam beatae architecto provident cum.Yes05 May 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
401cum deserunt nesciuntMolestiae quasi totam voluptatem in esse dignissimos ut.Yes18 May 12:37Edit
98aperiam rerumRerum quaerat eligendi voluptatem.Yes31 May 12:37Edit
212quis veniamNam consequatur similique doloribus tempore tenetur recusandae ex.Yes14 Jun 12:37Edit
338impeditIllum odit tempora aut aut sint facere praesentium illo.Yes27 Apr 12:37Edit

Fork me on GitHub