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'
21-40 / 500 Voir tous
340est vitaeSint sit quia minima nostrum ut neque.No17 Jun 12:37Edit
314facere adipisci doloresImpedit recusandae pariatur dolores asperiores et quibusdam.No16 May 12:37Edit
300minimaConsequatur nesciunt tempora asperiores quo ipsa repudiandae qui dolorem.Yes07 Apr 12:37Edit
299consequaturExercitationem voluptatem sint ad.No14 Apr 12:37Edit
295itaque velitVoluptatem rerum non expedita illum et quod.No30 Apr 12:37Edit
281velitDolorum quaerat asperiores itaque quibusdam libero aspernatur sed eius.No20 Mar 12:37Edit
278itaqueEveniet quam sint occaecati qui expedita asperiores.Yes25 Apr 12:37Edit
265reprehenderit voluptasProvident explicabo exercitationem quia voluptates.No01 Apr 12:37Edit
262eosQuia ea eos qui omnis odio et.No22 Apr 12:37Edit
253quosAut fuga qui excepturi ut tempora dolor voluptatem.Yes26 May 12:37Edit
247eum temporeDignissimos cumque rem dolores voluptatem numquam omnis unde autem.No09 Jun 12:37Edit
246eos laborumDelectus assumenda sint praesentium est.No19 Apr 12:37Edit
244autem sintEarum quibusdam rerum amet quae laudantium.Yes14 Apr 12:37Edit
236consequatur quisquamMinus mollitia ab quia soluta provident aut tempora aut.No05 Jun 12:37Edit
228reprehenderitDeleniti non necessitatibus voluptas.No19 Apr 12:37Edit
212quis veniamNam consequatur similique doloribus tempore tenetur recusandae ex.Yes14 Jun 12:37Edit
209fugaA amet qui quas aliquam neque.Yes24 Apr 12:37Edit
201voluptasEt ut autem at ex voluptatibus assumenda.No16 Mar 12:37Edit
181temporeCorporis rerum id possimus adipisci placeat omnis et.No09 May 12:37Edit
167enimNon quaerat porro ut aspernatur placeat qui.No28 Mar 12:37Edit

Fork me on GitHub