I have a database in which I have the blob
of an image, now I want to show it in an interface created with rails_admin
, I'm doing it as mentioned in link in the output formatting part, but I do not know how to pass the blob
to a valid URL for the img tag, for now I have it like this but it does not work
config.model Resource do
list do
field :Recurso do
formatted_value do
bindings[:view].tag(:img, { :src => Base64.urlsafe_decode64(bindings[:object].element) }) << URI.decode_www_form_component(bindings[:object].element, enc=Encoding::UTF_8)
end
end
field :type_resource
end
end