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 -%>
    
381-400 / 500 show all
381eosId quia ipsa laudantium.No12 May 12:37Edit
382vel nostrumMaiores officiis sequi aut at quia.No14 Jun 12:37Edit
383omnis vel delectusDolorem amet et et in iusto autem occaecati.No16 May 12:37Edit
384quiaNihil voluptas unde voluptas nobis.No27 May 12:37Edit
385et teneturDelectus consectetur vitae dicta eveniet.No13 Apr 12:37Edit
386eveniet ipsam etExpedita maiores natus ab voluptatem nesciunt.No28 Mar 12:37Edit
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
393nihilAut non incidunt omnis assumenda.Yes18 Apr 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
397tempore ut aliquidLaudantium labore perferendis ut doloremque.Yes05 Jun 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

Fork me on GitHub