WiceGrid 3.6.0.pre4 examples

Disabling filters

To disable a filter use filter: false .

  • # encoding: utf-8
    class Basics4Controller < ApplicationController
      def index
         @tasks_grid = initialize_grid(Task)
      end
    end
    
  • <%= grid(@tasks_grid) do |g|
    
      g.column name:  'ID', attribute: 'id', filter: false
    
      g.column name:  'Title', attribute: 'title'
    
      g.column  name:  'Description', attribute: 'description', filter: false
    
      g.column  name:  'Archived', attribute: 'archived' do |task|
        task.archived? ? 'Yes' : 'No'
      end
    
      g.column name:  'Added', attribute: 'created_at', filter: false 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
        To disable a filter use
        %code filter: false
        \.
    
    = show_code
    
    .row-fluid
      .col-md-12
        = render   'grid'
IDTitleDescriptionArchivedAdded
461-480 / 500 show all
461dolor voluptasItaque quibusdam repellat in.No05 Jun 12:37Edit
462provident doloremque laudantiumVoluptas nihil enim placeat.No14 Mar 12:37Edit
463excepturiNobis doloribus eos aut voluptatem eaque.No18 Mar 12:37Edit
464culpaError deleniti qui quaerat sint.No23 May 12:37Edit
465totamQui adipisci aspernatur qui non.No23 Apr 12:37Edit
466autIllum corporis occaecati quia quo aut ratione voluptatem.No19 Mar 12:37Edit
467in error praesentiumEarum temporibus quae laudantium.No12 May 12:37Edit
468officiisUt a qui quod saepe unde excepturi.No07 Jun 12:37Edit
469natus autemSed deleniti iste et eos magnam delectus in sequi.Yes10 Jun 12:37Edit
470et nonQuia eaque consequatur minima ut pariatur.No19 Jun 12:37Edit
471illo ut evenietSed esse et sit qui iste odit sint ex.No01 Apr 12:37Edit
472perspiciatisNihil qui dolore dignissimos dicta.No26 Mar 12:37Edit
473voluptatum quiBlanditiis quisquam ut eos eum.No11 Jun 12:37Edit
474possimusAut quia quia a et assumenda voluptas.No23 Mar 12:37Edit
475rerum perspiciatis eumSoluta non et temporibus.No20 Apr 12:37Edit
476facere voluptasOccaecati consectetur neque ullam dolores qui.Yes21 May 12:37Edit
477et corruptiLabore non ab accusamus culpa aliquam dicta eaque.No03 May 12:37Edit
478necessitatibusQui omnis tempora velit.No10 May 12:37Edit
479provident exMolestias animi adipisci sed qui sit ducimus ut et.No02 May 12:37Edit
480quas sapiente rerumQuos aut dolor error nihil at placeat quia id.No25 Apr 12:37Edit

Fork me on GitHub