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 -%>
    
21-40 / 500 show all
159ut maioresRerum qui esse aliquid repellat eveniet nemo.No09 May 12:37Edit
278itaqueEveniet quam sint occaecati qui expedita asperiores.Yes25 Apr 12:37Edit
92est praesentiumModi pariatur voluptatem perspiciatis.No08 Jun 12:37Edit
406sequi beataeSit velit consequuntur minus possimus.No26 Apr 12:37Edit
448tempore aliquam rationeQuam rerum tenetur aliquid.No23 Mar 12:37Edit
348inventore sedSuscipit occaecati et tempore similique voluptatem aut quae.No21 Mar 12:37Edit
462provident doloremque laudantiumVoluptas nihil enim placeat.No14 Mar 12:37Edit
153facilis utQui omnis beatae enim.No15 Apr 12:37Edit
370accusantium error exercitationemMolestiae eos quibusdam quod id voluptatem eius.No25 Apr 12:37Edit
419voluptatem rerumOmnis eos labore nulla temporibus provident ratione sed excepturi.Yes21 Apr 12:37Edit
297dolores magnam eosAsperiores possimus modi sint et quia.No12 Mar 12:37Edit
240illoMolestias nostrum quis itaque sed.No24 May 12:37Edit
404at aliquam corruptiVitae ut excepturi earum eum officia quidem repellat perspiciatis.No23 May 12:37Edit
369reprehenderit rerumRepudiandae assumenda reprehenderit rerum voluptatibus sapiente.No15 Jun 12:37Edit
343dolorem sit molestiasEaque exercitationem aut dolorem amet.No18 Apr 12:37Edit
292excepturi hicEsse saepe deserunt ipsam.No24 May 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
489voluptatemExcepturi voluptas molestias aspernatur corporis.No02 Jun 12:37Edit
487natus etVoluptatibus mollitia corporis est numquam eum.No14 May 12:37Edit
449dolores sedVoluptatibus et excepturi molestiae.No05 Jun 12:37Edit

Fork me on GitHub