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'
81-100 / 500 show all
118hicDolores voluptatem nobis repudiandae consequatur fugiat autem voluptas.No25 Mar 12:37Edit
352autemUt provident voluptates dolor.No12 Jun 12:37Edit
370accusantium error exercitationemMolestiae eos quibusdam quod id voluptatem eius.No25 Apr 12:37Edit
479provident exMolestias animi adipisci sed qui sit ducimus ut et.No02 May 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
139aliquid oditOccaecati veritatis asperiores vitae aut.No19 Apr 12:37Edit
183iureFugiat sit unde quibusdam iste autem in.No14 Apr 12:37Edit
215aliquid sed suntQuis sed voluptate voluptatibus voluptatem doloremque et.Yes12 May 12:37Edit
263nonFugit possimus ut aut.No24 Mar 12:37Edit
270modi minusIllo voluptas eum dolorem accusantium deleniti aliquam.No04 May 12:37Edit
456inventore voluptasQuis molestiae ipsa omnis blanditiis ut dolores.No31 May 12:37Edit
36placeatQuia aut eligendi aliquid.No13 Apr 12:37Edit
120esse voluptas deseruntFugit error sed id rem doloribus.No07 May 12:37Edit
315autemSapiente sit est laboriosam quo officiis ab.No14 Jun 12:37Edit
318beataeQuaerat veniam architecto est.No13 Mar 12:37Edit
457asperiores qui nonIllum consequatur laboriosam iusto praesentium sed dolore.No15 May 12:37Edit
91quaeratFacere ullam veniam inventore ea.No08 Jun 12:37Edit
129voluptates minima molestiaeMolestias enim voluptatibus voluptatem aut.No03 May 12:37Edit
149omnis errorOdit voluptatem corporis reprehenderit soluta reiciendis.No12 Mar 12:37Edit
234quidem corporisAut velit earum velit assumenda.No09 Jun 12:37Edit

Fork me on GitHub