demarches-normaliennes/app/fields/attachment_field.rb
2019-06-17 16:16:28 +02:00

11 lines
215 B
Ruby

require "administrate/field/base"
class AttachmentField < Administrate::Field::Base
def to_s
data.filename.to_s
end
def blob_path
Rails.application.routes.url_helpers.rails_blob_path(data)
end
end