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'
401-420 / 500 show all
387sedMolestias aut iusto aliquid.No27 Mar 12:37Edit
388aspernatur dolores velIn velit quis optio exercitationem aspernatur et pariatur.No26 May 12:37Edit
389utVoluptatem hic sapiente perspiciatis quos expedita et velit.No28 May 12:37Edit
390voluptas ut etEst eos omnis doloremque aut.No15 Mar 12:37Edit
391aut estVelit distinctio necessitatibus culpa debitis non eos molestiae rerum.No12 Mar 12:37Edit
392velit vitaeVero tenetur ex et totam nam natus aperiam doloremque.No16 May 12:37Edit
394minus facilisNulla repellat optio ea ut.No28 Mar 12:37Edit
395quia nobis quidemQuia quis repellendus eos adipisci.No24 May 12:37Edit
396at consequatur quaeratNostrum enim iusto architecto numquam.No29 Mar 12:37Edit
398dolores sitEt quae alias vitae sint autem eaque.No29 Mar 12:37Edit
399rerum quaeUt quisquam molestiae at aut.No16 Apr 12:37Edit
400et voluptatibusQui aliquam et quia.No23 Apr 12:37Edit
402atReiciendis ut reprehenderit occaecati quia voluptatum error debitis.No01 Jun 12:37Edit
403et praesentium temporeAccusamus omnis odit in cumque soluta aliquam.No01 May 12:37Edit
404at aliquam corruptiVitae ut excepturi earum eum officia quidem repellat perspiciatis.No23 May 12:37Edit
405magni excepturiNon inventore non placeat incidunt cum.No31 May 12:37Edit
406sequi beataeSit velit consequuntur minus possimus.No26 Apr 12:37Edit
407similique voluptatumVoluptatem nesciunt quos omnis.No08 May 12:37Edit
408quibusdam voluptatePerferendis sit rerum aliquam ullam et quia nemo.No10 Apr 12:37Edit
409dolore etAut sequi veniam eius eveniet.No12 Mar 12:37Edit

Fork me on GitHub