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 -%>
    
61-80 / 500 show all
436accusantiumCorrupti qui mollitia temporibus.No05 Apr 12:37Edit
111sit eaCulpa numquam dolorem corporis corrupti aliquam.Yes03 Jun 12:37Edit
10rerum occaecatiCum aperiam voluptas aut.No22 May 12:37Edit
307omnisCum ducimus rerum officiis nihil quam.No07 Jun 12:37Edit
47temporibus iure delectusCumque placeat aut vel repellat omnis accusamus error odio.No22 Apr 12:37Edit
231quia quisCupiditate error facilis qui nobis modi hic.Yes21 Mar 12:37Edit
291odio fugit etCupiditate repudiandae corrupti sed culpa cumque vitae aut et.No16 Jun 12:37Edit
426accusantium eligendiDebitis dolore id eos tempora.No29 Apr 12:37Edit
246eos laborumDelectus assumenda sint praesentium est.No19 Apr 12:37Edit
385et teneturDelectus consectetur vitae dicta eveniet.No13 Apr 12:37Edit
347sint aut velDeleniti et aut laboriosam praesentium.No04 May 12:37Edit
228reprehenderitDeleniti non necessitatibus voluptas.No19 Apr 12:37Edit
218quaerat sequiDeserunt et rem ut.No03 Apr 12:37Edit
233nesciunt suscipit quisDicta vel atque occaecati quisquam qui est tempora.Yes14 Mar 12:37Edit
319et voluptatemDicta vel deleniti quasi enim laudantium repudiandae est sint.No16 Mar 12:37Edit
247eum temporeDignissimos cumque rem dolores voluptatem numquam omnis unde autem.No09 Jun 12:37Edit
121dolore idDignissimos fugit amet nulla quis numquam sed explicabo.No15 Jun 12:37Edit
48qui inciduntDignissimos harum ut ea veritatis ut.No04 Apr 12:37Edit
28laborum enim voluptasDignissimos sed laudantium in consequatur quaerat molestias optio maxime.No05 May 12:37Edit
237vel esseDistinctio accusamus et dolores aliquam repudiandae omnis.No04 Jun 12:37Edit

Fork me on GitHub