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 -%>
    
481-500 / 500 show all
434voluptas quisquamRerum quaerat eos numquam.No20 Apr 12:37Edit
60voluptas repellendusTempora suscipit quibusdam rerum expedita aut.No02 Jun 12:37Edit
390voluptas ut etEst eos omnis doloremque aut.No15 Mar 12:37Edit
413voluptateAnimi esse amet nihil ad nobis voluptatum.No25 Mar 12:37Edit
24voluptate culpaEt velit ut libero dolores.No01 Jun 12:37Edit
499voluptatemMagnam accusantium id aut et quaerat praesentium eveniet.No09 May 12:37Edit
33voluptatemDolorem saepe et aspernatur.No04 May 12:37Edit
415voluptatemAccusantium mollitia dolorem nesciunt ipsa libero dolor.No17 Apr 12:37Edit
489voluptatemExcepturi voluptas molestias aspernatur corporis.No02 Jun 12:37Edit
97voluptatem facilis etIncidunt dolorem molestias deserunt repellat vero aut.No15 Mar 12:37Edit
32voluptatem ipsam liberoBlanditiis omnis enim voluptas fugit molestiae.No07 Jun 12:37Edit
419voluptatem rerumOmnis eos labore nulla temporibus provident ratione sed excepturi.Yes21 Apr 12:37Edit
374voluptatem saepeVoluptatum dicta voluptatem ut laboriosam tempora consequuntur quam.No01 Apr 12:37Edit
260voluptates dolorem officiaSint quidem vel asperiores.No19 May 12:37Edit
129voluptates minima molestiaeMolestias enim voluptatibus voluptatem aut.No03 May 12:37Edit
182voluptates nullaUllam est et quisquam perspiciatis qui aliquid neque dolores.No22 May 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit
304voluptatibus minimaEa exercitationem molestiae magni corrupti quis aperiam et repellat.No18 Apr 12:37Edit
275voluptatumEsse magnam ut repellendus.No08 May 12:37Edit
473voluptatum quiBlanditiis quisquam ut eos eum.No11 Jun 12:37Edit

Fork me on GitHub