@@ -34,7 +34,12 module AttachmentsHelper | |||
|
34 | 34 | def link_to_attachments(container, options = {}) |
|
35 | 35 | options.assert_valid_keys(:author, :thumbnails) |
|
36 | 36 | |
|
37 |
attachments = container.attachments. |
|
|
37 | attachments = if container.attachments.loaded? | |
|
38 | container.attachments | |
|
39 | else | |
|
40 | container.attachments.preload(:author).to_a | |
|
41 | end | |
|
42 | ||
|
38 | 43 | if attachments.any? |
|
39 | 44 | options = { |
|
40 | 45 | :editable => container.attachments_editable?, |
General Comments 0
You need to be logged in to leave comments.
Login now