<% content = local_assigns[:content] || local_assigns[:essence_file_view] %> <%- if attachment = content.ingredient -%> <%- html_options = local_assigns.fetch(:html_options, {}) -%> <%= link_to( content.essence.link_text.presence || content.settings_value(:link_text, local_assigns.fetch(:options, {})) || attachment.name, attachment.url, { class: content.essence.css_class.presence, title: content.essence.title.presence }.merge(html_options) ) -%> <%- end -%>