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
    
  • <%= 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 -%>
    
  • .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'
201-220 / 500 show all
193idQuia voluptas sit aut sed maiores accusantium soluta.No15 May 12:37Edit
250id culpa aliquidMagni possimus corrupti sed voluptatem earum harum ipsum.No04 Apr 12:37Edit
371id officiis doloremEnim earum cupiditate suscipit libero.No14 May 12:37Edit
19id rem eaIn odio quia laborum quam dicta nulla.Yes29 Mar 12:37Edit
44id temporibus eligendiId dignissimos dolorem enim ut.No27 Mar 12:37Edit
240illoMolestias nostrum quis itaque sed.No24 May 12:37Edit
284illo explicaboVel quibusdam quia repellendus eligendi at.No28 Mar 12:37Edit
471illo ut evenietSed esse et sit qui iste odit sint ex.No01 Apr 12:37Edit
34illo voluptasEsse et fuga voluptate eveniet qui.No14 Jun 12:37Edit
452illum et voluptatemAccusamus quis quis sapiente distinctio aut et quaerat asperiores.Yes13 May 12:37Edit
72illum explicabo modiNesciunt exercitationem quisquam commodi ut.No16 Jun 12:37Edit
338impeditIllum odit tempora aut aut sint facere praesentium illo.Yes27 Apr 12:37Edit
313impeditOptio repellat sapiente est excepturi.No29 May 12:37Edit
1impedit aperiam liberoEst necessitatibus tempora ut.No22 May 12:37Edit
43impedit atque minimaAperiam expedita autem porro enim veniam.Yes03 Jun 12:37Edit
96impedit explicabo voluptatemHic eveniet pariatur non nostrum.No02 Jun 12:37Edit
497impedit quoQuod earum illum voluptatem.No11 Apr 12:37Edit
134impedit voluptas eligendiIncidunt dolores sint amet dignissimos dolorum illum officiis dolorem.No10 May 12:37Edit
441in autRatione quam eveniet corporis.No23 May 12:37Edit
467in error praesentiumEarum temporibus quae laudantium.No12 May 12:37Edit

Fork me on GitHub