def attachment_url(record, name, *args, fallback: nil, **opts)
      file = record && record.public_send(name)
      if file
        Refile.attachment_url(record, name, *args, **opts)
      elsif fallback
        asset_url(fallback)
      end
    end
def attachment_url(record, name, *args, fallback: nil, **opts)
      file = record && record.public_send(name)
      if file
        Refile.attachment_url(record, name, *args, **opts)
      elsif fallback
        asset_url(fallback)
      end
    end
View helper which generates a url for an attachment. This generates a URL
 to the {Refile::App} which is assumed to be mounted in the Rails
 application.

 @see Refile.attachment_url

 @param [Refile::Attachment] object   Instance of a class which has an attached file
 @param [Symbol] name                 The name of the attachment column
 @param [String, nil] filename        The filename to be appended to the URL
 @param [String, nil] fallback        The path to an asset to be used as a fallback
 @param [String, nil] format          A file extension to be appended to the URL
 @param [String, nil] host            Override the host
 @return [String, nil]                The generated URL