I'm working through a rails_admin (on RoR 3.1.0) interface for my site (which is an teacher/event pairing site). There are a few basic models, the important ones are teacher, location, event, a开发者_运维知识库nd image. Teachers "teach" events (habtm), events are at a location, and photos can be paired to locations, events, and teachers.
[ I'm kinda new to RoR architecture... does this make sense? ]
I'm getting a
undefined method 'excluded?' for RailsAdmin::Config:Module
error in
.bundler/ruby/1.8/rails_admin-a311e3b833ff/app/views/rails_admin/main/_form_fieldset.html.haml
The same error (and similar situation) is answered at http://groups.google.com/group/rails_admin/browse_thread/thread/f517dd1287293a92/970f8433f7e644b9?lnk=raot, but it doesn't seem to apply to me. The "source" of the problem is here (in config/initializers/rails_admin.rb)
field :images, :has_and_belongs_to_many_association
field :location, :belongs_to_association
field :disciplines, :has_and_belongs_to_many_association
field :teachers, :has_and_belongs_to_many_association
When I comment out the :location and :teachers lines, everything works, but I don't get the right behavior for the teachers.
What am I missing?
Turns out I had a column named :teachers as well as a HABTM relationship named :teachers. Dunno how I missed that for that long...
精彩评论