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'
141-160 / 500 Voir tous
141excepturiSimilique autem eos facere provident qui pariatur.No14 Apr 12:37Edit
142maxime accusamus consecteturSunt deleniti ex porro vel quod.No31 May 12:37Edit
143et qui etQuae enim voluptas asperiores soluta.No02 Apr 12:37Edit
144est errorQui facere accusantium sint iusto quod consectetur dolores.No15 Apr 12:37Edit
145asperioresSit consectetur dignissimos blanditiis velit aperiam est ratione reprehenderit.No05 Jun 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
147adipisci ut asperioresSed sed ullam blanditiis aut consequatur mollitia ipsam et.No29 Mar 12:37Edit
148porro ducimus voluptatibusRerum sint et minima.No18 Mar 12:37Edit
149omnis errorOdit voluptatem corporis reprehenderit soluta reiciendis.No12 Mar 12:37Edit
150qui remVoluptates deserunt non dolorem.No01 Jun 12:37Edit
151ullam labore architectoFugit ut deserunt quia dolorem ut.No24 Mar 12:37Edit
152nihilReiciendis explicabo sit porro veritatis illum nemo asperiores est.No19 Mar 12:37Edit
153facilis utQui omnis beatae enim.No15 Apr 12:37Edit
154nostrumQuia cupiditate facere itaque doloribus sit ab expedita vero.No06 Jun 12:37Edit
155perferendis utEt assumenda repellendus nemo tempore non ea neque qui.No10 May 12:37Edit
156rationeFugiat facilis eligendi maiores facere maxime tempora magni.No14 Jun 12:37Edit
157rerumEum voluptatibus quis in.No12 Jun 12:37Edit
158aut voluptatibus autLaudantium quae beatae et architecto voluptatem libero et.No12 Apr 12:37Edit
159ut maioresRerum qui esse aliquid repellat eveniet nemo.No09 May 12:37Edit
160aut voluptatesEarum odio voluptatem nulla.No20 Mar 12:37Edit

Fork me on GitHub