Sha256: 276e372f9d86e30526b3e55bc76975db9ab26d8254efcfd5a3dab299a1223593

Contents?: true

Size: 658 Bytes

Versions: 22

Compression:

Stored size: 658 Bytes

Contents

<%# @param object [model] model instance %>
<%# @param field_name [String] name of the field %>
<%# @param value [Object] value of the field %>
<%# @param metadata [Hash] metadata of the field %>
<% unique_collection = value.uniq %>
<%= raw unique_collection.first(2).map { |item| show_link item, options: { readonly: true } }.join(', ') %>
<%= if unique_collection.length > 2
  title = metadata[:label]
  body = unique_collection.map { |item| show_link item, options: { readonly: true } }.to_sentence.html_safe
  label = "#{unique_collection.length - 2} more"
  concat ' and '
  imodal title, body, label: label
elsif unique_collection.blank?
  null
end %>

Version data entries

22 entries across 11 versions & 1 rubygems

Version Path
wallaby-8.0.0 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-8.0.0 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-7.0.0 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-7.0.0 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-6.1.6 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-6.1.6 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-6.1.5 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-6.1.5 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-6.1.4 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-6.1.4 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-6.1.3 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-6.1.3 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-6.1.2 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb
wallaby-6.1.2 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-6.1.1 app/views/wallaby/resources/index/_has_many.html.erb
wallaby-6.1.1 app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb