Sha256: 9c3b9843a32ff534da60c5cd6c05f353e169c36ef875bbf0e926db0a4b93d5cc

Contents?: true

Size: 565 Bytes

Versions: 5

Compression:

Stored size: 565 Bytes

Contents

class BookGridWithNestedAttributes < Netzke::Basepack::Grid
  def configure(c)
    c.columns = [:title, {:name => :author__first_name, :nested_attribute => true}, {:name => :author__last_name, :nested_attribute => true}]
    c.model = "Book"
    super
  end

  # Override edit_window component in order to provide a custom list of fields for the form
  def edit_window_component(c)
    super
    c.form_config.items = [{:name => :title}, {:name => :author__first_name, :nested_attribute => true}, {:name => :author__last_name, :nested_attribute => true}]
  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/book_grid_with_nested_attributes.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/components/book_grid_with_nested_attributes.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/components/book_grid_with_nested_attributes.rb
netzke-basepack-0.8.1 test/basepack_test_app/app/components/book_grid_with_nested_attributes.rb
netzke-basepack-0.8.0 test/basepack_test_app/app/components/book_grid_with_nested_attributes.rb