Ruby on Rails Tuesday, February 27, 2018

Can you say a little more about which uploader you are using? Is it Paperclip, CarrierWave, Shrine...

They each have their own way to do this. To answer your larger question, the method image_url is being injected into your object from the uploader gem, and it should respond with the calculated URL of the image, to match how you configured that uploader.

Walter

> On Feb 25, 2018, at 7:10 PM, Joe Guerra <jguerra@jginfosys.com> wrote:
>
> Hi, I've got 2 uploaders in my app. They are both uploading to aws s3 no problems.
>
> I'm able to display my photos on my show page using, but having no luck with my avatar.
>
> <%= image_tag @photo.image_url(:thumb).to_s %>
>
> <%= image_tag @user.image_url(:thumb).to_s %>
>
>
> I don't even know where .image_url comes from? It's not saved in the table and not in either of the models or controllers.
>
> Any clues?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1caa52a8-34e2-48d9-86a5-f955a8b63573%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/C54ACC13-5E43-4F22-89CA-90A4DEE4511B%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment