# A class that allows a single item from a collection of attachments to function as a single attachment class MainPhoto < SimpleDelegator def attached? __getobj__.present? end end