Skip to content

accepts_nested_attributes_for not identified on extending class #1142

lieldulev opened this Issue May 18, 2012 · 3 comments

2 participants


Given this code

Class Person
 include Mongoid::Document
 embeds_many :things, class_name: 'PersonThing'
 accepts_nested_attributes_for :things

Class Child < Person
 # some other fields here

rails_admin throws error:

Embbeded association without accepts_nested_attributes_for can't be handled by RailsAdmin,
because embedded model doesn't have top-level access.
Please add 'accepts_nested_attributes_for :things' line to 'Child' model.

Not sure if it's rails or mongoid issue.


btw - I'm referring to the latest master branch, both on rails_admin and mongoid

@mshibuya mshibuya closed this in 3da8444 May 18, 2012

There was a bug in RailsAdmin's Mongoid adapter.
Thanks for submitting the issue!


Submitting issues is easy, Thank you for fixing it :)

@nofxx nofxx added a commit that referenced this issue May 25, 2012
@nofxx nofxx Merge remote-tracking branch 'sferik/master'
* sferik/master:
  fix order
  add spec
  Searching inside embedded model was not working. Fixes #1125
  Added change triggers on filtering-(multi)-select
  fix ci
  fix History#latest order
  add spec to fail the History#latest
  Fix error with inherited children of embeds_* model. Fixes #1142
  Add Rubinius to CI matrix. Closes #1078
  Remove pjax class from navbar Home link. Fixes #1119
  Fix middle/cmd click not opening in new tab. Ref #1119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.