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'
441-460 / 500 show all
47temporibus iure delectusCumque placeat aut vel repellat omnis accusamus error odio.No22 Apr 12:37Edit
76totamDistinctio et pariatur non est consequatur enim.No31 Mar 12:37Edit
465totamQui adipisci aspernatur qui non.No23 Apr 12:37Edit
151ullam labore architectoFugit ut deserunt quia dolorem ut.No24 Mar 12:37Edit
443ullam laudantium commodiEaque tempora non quia sit quia perspiciatis mollitia.No18 May 12:37Edit
438undePlaceat occaecati sunt at dolor quos aspernatur rerum voluptatem.No26 Apr 12:37Edit
13utEst voluptas impedit perferendis excepturi aliquid doloremque.No22 Mar 12:37Edit
82utEt debitis enim repellat qui voluptatem a nam nisi.No04 Jun 12:37Edit
389utVoluptatem hic sapiente perspiciatis quos expedita et velit.No28 May 12:37Edit
107utInventore saepe voluptatibus voluptas dignissimos omnis molestias quisquam.No02 Apr 12:37Edit
446ut et sitUt voluptatem est facere quasi.No04 Apr 12:37Edit
166ut exVoluptatem qui aut et accusamus saepe eius laboriosam.No06 May 12:37Edit
433ut facereSit sapiente ducimus earum quia.No15 May 12:37Edit
159ut maioresRerum qui esse aliquid repellat eveniet nemo.No09 May 12:37Edit
440ut quae atFugiat voluptate veniam distinctio aut voluptatibus est et.No29 Apr 12:37Edit
2ut sintAssumenda ut in commodi nihil ratione odio voluptatibus ea.No09 Apr 12:37Edit
485ut teneturEos corporis voluptate ex sed totam.No10 Jun 12:37Edit
7ut veniamMolestiae qui qui quo occaecati.No10 May 12:37Edit
442ut voluptatemQuibusdam et veniam ut.No10 Jun 12:37Edit
205velAut corrupti facere omnis officia.No15 May 12:37Edit

Fork me on GitHub