Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate Paperclip urls with data provided via Elasticsearch #583

Closed
wants to merge 1 commit into from

Conversation

equivalent
Copy link
Contributor

@equivalent equivalent commented Jun 27, 2016

instructions how to render Paperclip urls without ActiveRecord calls

Based on this article: http://www.eq8.eu/blogs/26-rendering-paperclip-url-via-elasticsearch-without-making-calls-to-activerecord-db

has_attached_file :attachment, styles: { thumb: '100x100>', screen: '1024x1024' }
end
rescue => e
puts e.inspect.ansi(:bold, :red)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paparclip is nasty, in some cases it may not be loaded properly and the has_attached_file will report NoMethodError

@equivalent equivalent changed the title generate Paperclip urls with data provided via Elastic search generate Paperclip urls with data provided via Elasticsearch Jun 27, 2016
@equivalent equivalent closed this Jun 30, 2016
@equivalent equivalent reopened this Jun 30, 2016
@equivalent equivalent closed this Jun 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant