I have one model based on ActiveRecord and another based on a Mogoid::Document. Is that possible to do an association together ?
For Example, the 2 models :
class User < ActiveRecord::Base
has_one :avatar, :dependent => :destroy
end
class Avatar
include Mongoid::Document
field :file_name
end
And retrieve User's avatar like this :
@user.avatar.file_name
Thanks !