ActiveStorage bridge was a contribution, I didn't write it, I haven't tried 
ActiveStorage yet. 
However, I can see form_ui is calling helper for list and show actions to 
display content, as 
other bridges related to file upload do.

Form_ui has this line:

        content = active_scaffold_column_active_storage_has_one(record, column) 
if 
active_storage.attached?

That line display content with same helper as list and show. And that helper, 
active_scaffold_column_active_storage_has_one method has this line:

attachment.attached? ? link_for_attachment(attachment) : nil

But link_for_attachment doesn't display thumbnail:

      def link_for_attachment(attachment)
        link_to(attachment.filename, rails_blob_url(attachment, disposition: 
'attachment'), 
target: '_blank')
      end


I think that helper method must be changed to display thumbnail, as other 
bridges do. 
Carrierwave bridge display thumbnail, and thumbnail style name can be changed 
in 
bridge config. Paperclip do it in same way. Dragonfly do it in same way too, 
but it allows to 
set :thumb option in column's options. What is code to display thumbnail with 
ActiveStorage?

El martes, 17 de marzo de 2020 0:23:32 (CET) Gloufy escribió:


Hi Sergio,


I'm using active storage plugin bridge in active scaffold.
But I don't have the thumbnail in form "mode" juste the name of the file. With 
dragonfly I 
have the thumbnail, do you know why ?


*How to persist file upload fields after a rails validation error[1] with 
activestorage and 
activescaffold ? 
https://stackoverflow.com/questions/15680484/how-to-persist-file-upload-fields-after-a-rails-validation-error*


Thank you for your help


Gloufy 
-- You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.To unsubscribe from this group and 
stop 
receiving emails from it, send an email to 
[email protected][2].To view this discussion on the 
web visit 
https://groups.google.com/d/msgid/activescaffold/3bf5a081-ede1-4402-bf52-1f518063b4af%40googlegroups.com[3].





--------
[1] 
https://stackoverflow.com/questions/15680484/how-to-persist-file-upload-fields-after-a-rails-validation-error
[2] mailto:[email protected]
[3] 
https://groups.google.com/d/msgid/activescaffold/3bf5a081-ede1-4402-bf52-1f518063b4af%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/activescaffold/7293451.lvqk35OSZv%40pc-sergio.
  • Activestorage Gloufy
    • Activestorage Gloufy
      • Re: Active... 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
        • Re: Ac... Gloufy
          • Re... 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
            • ... 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
            • ... Gloufy
              • ... Sergio Cambra

Reply via email to