This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/views/attachments/_attachment.html.erb --> | |
<div class="attachment-image col-xs-6 col-sm-4 col-md-3" id="attachment_<%= @report.slug %><%= attachment.id %>elv1"> | |
<div class="row"> | |
<div class="attached-image-wrapper col-xs-12"> | |
<a class="attached-image" data-lightbox="report-attachment" style="background-image:url('<%= attachment.image_url(:preview) %>');" href="<%= attachment.image_url(:original) %>"></a> | |
</div> | |
</div> | |
<div class="attachment-options-wrapper"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DISCLAIMER: | |
Sorry if this is a little long winded but I just want to ensure I communicate it properly (also I'm still learning Ruby & Rails so sorry if some issues are Rails questions than Algolia specific). | |
MY APP: | |
My Rails app has the following models: | |
- Company (has_many :users, has_many :reports) | |
- User (belongs_to :company, has_many :reports) | |
- Report (belongs_to :company, belongs_to :user) |