Sha256: 6ff55603f131268c9f2adcb6dff9b57e8a5da71c1c29f36cd282f6275f24cf9b
Contents?: true
Size: 700 Bytes
Versions: 12
Compression:
Stored size: 700 Bytes
Contents
<%= f.fields_for image do |ff| %> <%= f.field_container image do %> <% attachment = @cms_section.send(image).attachment %> <% if attachment&.attached? && attachment&.variable? %> <figure class="admin-img-holder"> <%= image_tag main_app.cdn_image_url(attachment.variant(resize_to_limit: [244, 104])) %> </figure> <% elsif attachment&.attached? && attachment&.image? %> <figure class="admin-img-holder"> <%= image_tag main_app.cdn_image_url(attachment) %> </figure> <% end %> <%= f.field_container image, class: ['mb-0'] do %> <%= ff.file_field :attachment %> <%= f.error_message_on image %> <% end %> <% end %> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems