something like that  image_tag user.avatar.variant(resize_to_limit: [100, 
100])

Where can I override the helper link_for_attachment(attachment) ? 

and for the other question do you have a clue how to do it ? (How to 
persist file upload fields after a rails validation error 
<https://stackoverflow.com/questions/15680484/how-to-persist-file-upload-fields-after-a-rails-validation-error>
 with 
activestorage and activescaffold ? )
Le mardi 17 mars 2020 12:47:06 UTC+1, Sergio Cambra a écrit :
>
> 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 
> <https://stackoverflow.com/questions/15680484/how-to-persist-file-upload-fields-after-a-rails-validation-error>
>  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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/activescaffold/3bf5a081-ede1-4402-bf52-1f518063b4af%40googlegroups.com
>  
> <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/cc2b370b-1a3a-4ae1-91bf-ff91e0ae92a2%40googlegroups.com.
  • 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