I am using refile and have two models:
class UserApplication < ActiveRecord::Base
attachment :avatar
end
class User < ActiveRecord::Base
attachment :avatar
def from_application(application)
# ...
self.avatar = application.avatar
# ...
end
end
When I try to set up a User from UserApplication, the avatar attachment that has been associated with UserApplication is not saved with a User.
How can I duplicate or attach the UserApplication#avatar to the User instance?