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 -%>
    
181-200 / 500 Sýna allt
108maximeItaque nisi fugiat et molestiae dolorem voluptas.No21 May 12:37Edit
143et qui etQuae enim voluptas asperiores soluta.No02 Apr 12:37Edit
153facilis utQui omnis beatae enim.No15 Apr 12:37Edit
155perferendis utEt assumenda repellendus nemo tempore non ea neque qui.No10 May 12:37Edit
165expeditaMolestiae porro totam ipsa enim cupiditate provident qui.No12 May 12:37Edit
166ut exVoluptatem qui aut et accusamus saepe eius laboriosam.No06 May 12:37Edit
234quidem corporisAut velit earum velit assumenda.No09 Jun 12:37Edit
240illoMolestias nostrum quis itaque sed.No24 May 12:37Edit
241blanditiis natusImpedit sit ea ut et.No15 Jun 12:37Edit
242quia doloremque perspiciatisExpedita perspiciatis quos dolor at in quae impedit doloremque.No26 May 12:37Edit
252quasi etSunt atque in necessitatibus officia dolorum.No10 Apr 12:37Edit
254ex estIpsa enim provident quia.Yes10 Jun 12:37Edit
271etNatus deserunt quibusdam rerum.Yes19 May 12:37Edit
272fugit maiores consequaturQuasi velit amet iure blanditiis ipsam in qui.No19 May 12:37Edit
282explicabo illumEt rem occaecati voluptatem ullam et error.No20 May 12:37Edit
285iure veniam numquamVoluptas eius possimus eos voluptates asperiores voluptatem perferendis.No29 May 12:37Edit
287sint non dolorAb aut rerum ut sequi tenetur voluptate repellat non.No07 May 12:37Edit
289quasiQui est mollitia minus tempore eaque perferendis non.No31 May 12:37Edit
303eosInventore nulla ut voluptatum quisquam ipsa voluptatem iste et.No13 May 12:37Edit
313impeditOptio repellat sapiente est excepturi.No29 May 12:37Edit

Fork me on GitHub