mongoid/mongoid — pull request #1788 by leemhenson (2012-03-06 15:09:20+00:00)
Title: Survive requests for foreign_key of Embedded::One relations

I'm trying to render a formtastic form that is enquiring about the relations in my mongoid document. I have some embedded documents, and when formtastic asks about the foreign key I get an exception because the determine_foreign_key method in Metadata assumes that all relations respond to :foreign_key_suffix, which is not the case for Embedded::One. I've patched it to only call the method :foreign_key_suffix if it responds to it. I'm not sure if there are any other considerations here?