Sha256: cd8ca6451c9ba8c4cc9e0dd4da9a7726b1163fdd15cedfc91b2424c6da1c2c7f

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

class NestedFieldTest
  include Mongoid::Document

  field :title, type: String
  belongs_to :field_test, inverse_of: :nested_field_tests
  belongs_to :another_field_test, inverse_of: :nested_field_tests
  include Mongoid::Timestamps

  has_many :deeply_nested_field_tests, inverse_of: :nested_field_test
  accepts_nested_attributes_for :deeply_nested_field_tests, allow_destroy: true
  has_one :comment, as: :commentable, autosave: true
  accepts_nested_attributes_for :comment, allow_destroy: true, reject_if: proc { |attributes| attributes['content'].blank? }
end

Version data entries

2 entries across 2 versions & 1 rubygems

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