Ruby on Rails Tuesday, February 27, 2018

oh, I figured this out.  I needed to use <%= image_tag @users.avatar %>


I've scrapped the project anyways.  

Thanks,
Joe

On Tuesday, February 27, 2018 at 11:04:47 AM UTC-5, Walter Lee Davis wrote:
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 <jgu...@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-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@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/bcfb079a-afe4-4d35-be8a-a26e6fb441ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment