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 -%>
    
281-300 / 500 show all
116dolorem consecteturNemo voluptate quo cum natus ut dolorum maxime consequuntur.No17 May 12:37Edit
249sint itaqueNeque cum vero laborum voluptatem aliquam velit quaerat voluptatem.Yes16 Jun 12:37Edit
367similiqueNeque fuga recusandae expedita omnis et.Yes07 May 12:37Edit
72illum explicabo modiNesciunt exercitationem quisquam commodi ut.No16 Jun 12:37Edit
66vitae at autemNihil quae dolores quia ut non.No06 May 12:37Edit
472perspiciatisNihil qui dolore dignissimos dicta.No26 Mar 12:37Edit
384quiaNihil voluptas unde voluptas nobis.No27 May 12:37Edit
57nequeNisi mollitia ipsam autem est voluptas consequatur expedita.No19 Mar 12:37Edit
309architecto esse autNisi quam et amet dolorem in assumenda.No25 May 12:37Edit
175aperiam omnisNisi qui itaque quia quaerat.No02 May 12:37Edit
463excepturiNobis doloribus eos aut voluptatem eaque.No18 Mar 12:37Edit
326similique maiores esseNobis minus nam fuga quia.No12 May 12:37Edit
216nihil vitae eaNobis tenetur qui occaecati voluptas quibusdam.No22 Apr 12:37Edit
335maximeNon beatae velit non est.No22 Mar 12:37Edit
405magni excepturiNon inventore non placeat incidunt cum.No31 May 12:37Edit
167enimNon quaerat porro ut aspernatur placeat qui.No28 Mar 12:37Edit
396at consequatur quaeratNostrum enim iusto architecto numquam.No29 Mar 12:37Edit
394minus facilisNulla repellat optio ea ut.No28 Mar 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
65eosOccaecati atque assumenda qui deleniti.Yes21 Apr 12:37Edit

Fork me on GitHub