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
    
  • .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'
  • <%= 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 -%>
    
21-40 / 500 show all
297dolores magnam eosAsperiores possimus modi sint et quia.No12 Mar 12:37Edit
125nihil eum minusAsperiores soluta ut qui.No29 Apr 12:37Edit
305dolorem harumAspernatur expedita accusantium quaerat fuga recusandae accusamus non.No19 Apr 12:37Edit
2ut sintAssumenda ut in commodi nihil ratione odio voluptatibus ea.No09 Apr 12:37Edit
251odit praesentiumAt saepe ipsa officiis ut minus est et nemo.No30 May 12:37Edit
358quibusdam consequunturAut animi debitis dicta voluptate itaque perferendis praesentium.No31 Mar 12:37Edit
67officia quo maioresAut aperiam aut sint voluptas voluptatibus ut cumque id.No15 Jun 12:37Edit
205velAut corrupti facere omnis officia.No15 May 12:37Edit
185aspernaturAutem minus et libero inventore.No11 Apr 12:37Edit
170fugiatAutem quia deleniti veritatis facere laudantium.No20 Apr 12:37Edit
253quosAut fuga qui excepturi ut tempora dolor voluptatem.Yes26 May 12:37Edit
112neque quiAut ipsa aut accusamus quia consequatur ea facilis.No05 Apr 12:37Edit
225beatae porroAut mollitia et ut.No22 Apr 12:37Edit
393nihilAut non incidunt omnis assumenda.Yes18 Apr 12:37Edit
474possimusAut quia quia a et assumenda voluptas.No23 Mar 12:37Edit
409dolore etAut sequi veniam eius eveniet.No12 Mar 12:37Edit
234quidem corporisAut velit earum velit assumenda.No09 Jun 12:37Edit
378modi iustoBeatae maxime corporis eum.No16 Jun 12:37Edit
32voluptatem ipsam liberoBlanditiis omnis enim voluptas fugit molestiae.No07 Jun 12:37Edit
453omnisBlanditiis optio in inventore qui consequatur et.No19 Mar 12:37Edit

Fork me on GitHub