Sha256: 8e073563cb93056ef58628da5f0dfbb4992b158704363c8d02622d36b8e93c5f

Contents?: true

Size: 319 Bytes

Versions: 5

Compression:

Stored size: 319 Bytes

Contents

# Grid with books that belong to the first author in the DB (assumes the existence of at least 1 author)
class BooksBoundToAuthor < Netzke::Basepack::Grid

  model "Book"

  def configure(c)
    c.scope = {:author_id => Author.first.id}
    c.strong_default_attrs = {:author_id => Author.first.id}
    super
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netzke-basepack-0.8.4 test/basepack_test_app/app/components/books_bound_to_author.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/components/books_bound_to_author.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/components/books_bound_to_author.rb
netzke-basepack-0.8.1 test/basepack_test_app/app/components/books_bound_to_author.rb
netzke-basepack-0.8.0 test/basepack_test_app/app/components/books_bound_to_author.rb