Sha256: 1b8858cb3751bf0ec87fe8dee4917ad077127f44be39c236d1fb966b1d70cc4d

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

class NestedFieldTest < ActiveRecord::Base
  belongs_to :field_test, inverse_of: :nested_field_tests
  belongs_to :another_field_test, inverse_of: :nested_field_tests
  has_one :comment, as: :commentable
  has_many :deeply_nested_field_tests, inverse_of: :nested_field_test
  accepts_nested_attributes_for :comment, allow_destroy: true, reject_if: proc { |attributes| attributes['content'].blank? }
  accepts_nested_attributes_for :deeply_nested_field_tests, allow_destroy: true
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_admin-0.6.4 spec/dummy_app/app/active_record/nested_field_test.rb
rails_admin-0.6.3 spec/dummy_app/app/active_record/nested_field_test.rb