Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

How do I get logo url with sql query? #2050

Closed
dieutb opened this issue Nov 16, 2015 · 3 comments
Closed

How do I get logo url with sql query? #2050

dieutb opened this issue Nov 16, 2015 · 3 comments

Comments

@dieutb
Copy link

dieutb commented Nov 16, 2015

Hi everyone. I query by sql string. And got logo_file_name: 'data'

I want to parse full url of logo. Is there any function can do this for me ?

Something like Paperclip::Attachment.parse_url(klass_name, field_name, id, image_type)?

@abunsen
Copy link

abunsen commented Jan 19, 2016

+1 on this.

@tute
Copy link
Contributor

tute commented May 9, 2016

The issue you describe seems specific to your app. I suggest that you ask about it in https://stackoverflow.com/questions/tagged/paperclip, which will get attention
from more people than in this issue tracker.

Sorry we don't have the time now to help you with this question, and thanks!

@tute tute closed this as completed May 9, 2016
@aperkins81
Copy link

+1 on this, sometimes sql is required for avoiding n+1 problems ... for now it seems when looping through portfolio images each image object needs to hit the database - I can't find an elegant way to join objects with their image url

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants