{"action":"created","issue":{"url":"https://api.github.com/repos/stephskardal/rails_admin_import/issues/56","repository_url":"https://api.github.com/repos/stephskardal/rails_admin_import","labels_url":"https://api.github.com/repos/stephskardal/rails_admin_import/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/stephskardal/rails_admin_import/issues/56/comments","events_url":"https://api.github.com/repos/stephskardal/rails_admin_import/issues/56/events","html_url":"https://github.com/stephskardal/rails_admin_import/issues/56","id":136529944,"number":56,"title":"Unable to import records with polymorphic associations","user":{"login":"dmitrypol","id":210308,"avatar_url":"https://avatars.githubusercontent.com/u/210308?v=3","gravatar_id":"","url":"https://api.github.com/users/dmitrypol","html_url":"https://github.com/dmitrypol","followers_url":"https://api.github.com/users/dmitrypol/followers","following_url":"https://api.github.com/users/dmitrypol/following{/other_user}","gists_url":"https://api.github.com/users/dmitrypol/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitrypol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitrypol/subscriptions","organizations_url":"https://api.github.com/users/dmitrypol/orgs","repos_url":"https://api.github.com/users/dmitrypol/repos","events_url":"https://api.github.com/users/dmitrypol/events{/privacy}","received_events_url":"https://api.github.com/users/dmitrypol/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-25T22:23:07Z","updated_at":"2016-02-26T19:55:50Z","closed_at":"2016-02-25T23:10:33Z","body":"Does anyone have experience with this?  The relationships are left blank.  \r\n\r\nAssuming I have the following polymorphic relationships:\r\nclass Donation\r\n  include Mongoid::Document\r\n  field :amount, type: Integer\r\n  belongs_to :donor, polymorphic: true\r\nend\r\nclass Company\r\n  include Mongoid::Document\r\n  field :name, type: String\r\n  has_many :donations, as: :donor\r\nend\r\nclass User\r\n  include Mongoid::Document\r\n  field :name, type: String\r\n  has_many :donations, as: :donor\r\nend\r\n\r\nHere is my CSV import file:\r\namount,donor_id,donor_type\r\n20,123,Company\r\n10,456,User\r\n"},"comment":{"url":"https://api.github.com/repos/stephskardal/rails_admin_import/issues/comments/189455686","html_url":"https://github.com/stephskardal/rails_admin_import/issues/56#issuecomment-189455686","issue_url":"https://api.github.com/repos/stephskardal/rails_admin_import/issues/56","id":189455686,"user":{"login":"monkbroc","id":1919681,"avatar_url":"https://avatars.githubusercontent.com/u/1919681?v=3","gravatar_id":"","url":"https://api.github.com/users/monkbroc","html_url":"https://github.com/monkbroc","followers_url":"https://api.github.com/users/monkbroc/followers","following_url":"https://api.github.com/users/monkbroc/following{/other_user}","gists_url":"https://api.github.com/users/monkbroc/gists{/gist_id}","starred_url":"https://api.github.com/users/monkbroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkbroc/subscriptions","organizations_url":"https://api.github.com/users/monkbroc/orgs","repos_url":"https://api.github.com/users/monkbroc/repos","events_url":"https://api.github.com/users/monkbroc/events{/privacy}","received_events_url":"https://api.github.com/users/monkbroc/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T19:55:50Z","updated_at":"2016-02-26T19:55:50Z","body":"The README update by @zrisher shows an example of importing complex associations."}}