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 -%>
    
101-120 / 500 Sýna allt
218quaerat sequiDeserunt et rem ut.No03 Apr 12:37Edit
334sitVoluptatem consequatur sunt facilis debitis quia velit.No03 Apr 12:37Edit
48qui inciduntDignissimos harum ut ea veritatis ut.No04 Apr 12:37Edit
84doloreOdio laboriosam velit pariatur ea autem distinctio.No04 Apr 12:37Edit
93autId vero doloremque animi unde.No04 Apr 12:37Edit
250id culpa aliquidMagni possimus corrupti sed voluptatem earum harum ipsum.No04 Apr 12:37Edit
446ut et sitUt voluptatem est facere quasi.No04 Apr 12:37Edit
451expedita nihilVoluptate maiores et sapiente.No04 Apr 12:37Edit
73iure architectoVoluptatum aperiam ad dolore aut fugit.No05 Apr 12:37Edit
112neque quiAut ipsa aut accusamus quia consequatur ea facilis.No05 Apr 12:37Edit
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
261cumque voluptasQuod distinctio iusto quia quas voluptatem est.No05 Apr 12:37Edit
436accusantiumCorrupti qui mollitia temporibus.No05 Apr 12:37Edit
498sedQui sint eos distinctio vel assumenda sed animi quae.Yes05 Apr 12:37Edit
126qui voluptatum atqueVeniam ut eaque commodi sint esse.No06 Apr 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
243molestiae similiqueLabore et dolor architecto dolorum aut recusandae.No06 Apr 12:37Edit
301autem perspiciatisSit enim itaque in earum cumque est et.No06 Apr 12:37Edit
350et quoRerum rem quos officiis molestias earum pariatur.Yes06 Apr 12:37Edit
447animi accusantium utSequi dolorem distinctio sit doloremque et corporis voluptatem alias.No06 Apr 12:37Edit

Fork me on GitHub