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'
61-80 / 500 show all
148porro ducimus voluptatibusRerum sint et minima.No18 Mar 12:37Edit
309architecto esse autNisi quam et amet dolorem in assumenda.No25 May 12:37Edit
173etQuod eum nulla consequatur tempora cumque consectetur nam.No29 Mar 12:37Edit
165expeditaMolestiae porro totam ipsa enim cupiditate provident qui.No12 May 12:37Edit
281velitDolorum quaerat asperiores itaque quibusdam libero aspernatur sed eius.No20 Mar 12:37Edit
141excepturiSimilique autem eos facere provident qui pariatur.No14 Apr 12:37Edit
256saepeEarum facere omnis voluptatem dolor ad.No04 May 12:37Edit
152nihilReiciendis explicabo sit porro veritatis illum nemo asperiores est.No19 Mar 12:37Edit
383omnis vel delectusDolorem amet et et in iusto autem occaecati.No16 May 12:37Edit
252quasi etSunt atque in necessitatibus officia dolorum.No10 Apr 12:37Edit
226ex aperiamSed iusto quisquam nostrum.No08 May 12:37Edit
335maximeNon beatae velit non est.No22 Mar 12:37Edit
344etProvident saepe expedita ipsum ut totam.No21 Apr 12:37Edit
203soluta possimus estIllum ut molestiae et officia aut earum.No28 May 12:37Edit
322qui doloresQuia rem qui unde eum et tempora.No31 Mar 12:37Edit
433ut facereSit sapiente ducimus earum quia.No15 May 12:37Edit
193idQuia voluptas sit aut sed maiores accusantium soluta.No15 May 12:37Edit
126qui voluptatum atqueVeniam ut eaque commodi sint esse.No06 Apr 12:37Edit
337estEos dolores ipsum ipsam mollitia.No21 Apr 12:37Edit
411iureVelit error et fugiat fuga provident debitis expedita.No21 Mar 12:37Edit

Fork me on GitHub