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 -%>
    
221-240 / 500 show all
37etIncidunt eum consequatur qui et quis.No09 May 12:37Edit
494fugiat quaeratIncidunt laborum voluptas cumque et pariatur.No30 May 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
213quod reprehenderitIn ex fuga voluptas dolores accusamus architecto.No21 May 12:37Edit
19id rem eaIn odio quia laborum quam dicta nulla.Yes29 Mar 12:37Edit
178molestias voluptas quiIn tempora quam expedita officiis quod.No14 Apr 12:37Edit
388aspernatur dolores velIn velit quis optio exercitationem aspernatur et pariatur.No26 May 12:37Edit
492sed atInventore ipsum qui rerum cum reiciendis nisi.No13 May 12:37Edit
303eosInventore nulla ut voluptatum quisquam ipsa voluptatem iste et.No13 May 12:37Edit
107utInventore saepe voluptatibus voluptas dignissimos omnis molestias quisquam.No02 Apr 12:37Edit
254ex estIpsa enim provident quia.Yes10 Jun 12:37Edit
224quia illum natusIpsam alias necessitatibus quaerat.No19 Mar 12:37Edit
41estIpsum illo corrupti nesciunt facere.No10 Apr 12:37Edit
290voluptasIste aut occaecati quo voluptates facere consequatur.No02 Jun 12:37Edit
329iusto sit rerumIste placeat voluptas possimus ut quasi optio.No31 May 12:37Edit
108maximeItaque nisi fugiat et molestiae dolorem voluptas.No21 May 12:37Edit
461dolor voluptasItaque quibusdam repellat in.No05 Jun 12:37Edit
444asperiores quisIure est soluta deserunt sunt.Yes09 Apr 12:37Edit
18necessitatibus commodiLabore dolor et cumque quos.No27 Mar 12:37Edit
243molestiae similiqueLabore et dolor architecto dolorum aut recusandae.No06 Apr 12:37Edit

Fork me on GitHub