Sha256: e6434e790c00028ee5f891943cdf7433aa0060e2568372f734ac89bd25a48fa7

Contents?: true

Size: 271 Bytes

Versions: 10

Compression:

Stored size: 271 Bytes

Contents

class BookGridWithScopedAuthors < Netzke::Basepack::GridPanel
  def configuration
    super.tap do |c|
      c[:model] = "Book"
      c[:columns] = [:title, {:name => :author__first_name, :scope => lambda{ |r| r.where(:first_name.matches => "%tom%") }}]
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
netzke-basepack-0.7.7 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-zh-0.7.6 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.6 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.5 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.4 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.3 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.2 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.1 test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.6.5 test/rails_app/app/components/book_grid_with_scoped_authors.rb
netzke-basepack-0.7.0 test/rails_app/app/components/book_grid_with_scoped_authors.rb