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'
321-340 / 500 show all
302eligendi velVel iste ea at sapiente eligendi inventore laudantium quas.No24 Mar 12:37Edit
303eosInventore nulla ut voluptatum quisquam ipsa voluptatem iste et.No13 May 12:37Edit
304voluptatibus minimaEa exercitationem molestiae magni corrupti quis aperiam et repellat.No18 Apr 12:37Edit
305dolorem harumAspernatur expedita accusantium quaerat fuga recusandae accusamus non.No19 Apr 12:37Edit
306omnis voluptatem abProvident sapiente odio distinctio et harum vel.No13 May 12:37Edit
307omnisCum ducimus rerum officiis nihil quam.No07 Jun 12:37Edit
308optio idVero non non saepe.No17 Jun 12:37Edit
309architecto esse autNisi quam et amet dolorem in assumenda.No25 May 12:37Edit
310quis modiFacere quia molestiae eos.No28 Mar 12:37Edit
311nihil maximeEst ducimus culpa aut aut.No20 Apr 12:37Edit
312repellendus perferendis vitaePariatur officia maxime libero ut vel dolor delectus.No17 May 12:37Edit
313impeditOptio repellat sapiente est excepturi.No29 May 12:37Edit
314facere adipisci doloresImpedit recusandae pariatur dolores asperiores et quibusdam.No16 May 12:37Edit
315autemSapiente sit est laboriosam quo officiis ab.No14 Jun 12:37Edit
316at enim ullamUt minima dolor molestias ut.No12 Apr 12:37Edit
317nulla perspiciatis sapienteDolor voluptatibus aut ipsa ad ut.No07 Jun 12:37Edit
318beataeQuaerat veniam architecto est.No13 Mar 12:37Edit
319et voluptatemDicta vel deleniti quasi enim laudantium repudiandae est sint.No16 Mar 12:37Edit
320quo corrupti autSunt voluptatem corrupti est molestias id porro.No29 Apr 12:37Edit
321quis est autemAmet veniam quia molestias eum modi impedit rerum ad.No02 May 12:37Edit

Fork me on GitHub