%h1== #{params[:model].titlecase.singularize} - #{@data_set.to_s} %p = link_to "Edit", edit_data_set_path(@data_set, :model => params[:model])  |  = link_to "Back to #{params[:model].titlecase.pluralize}", data_sets_path(:model => params[:model]) - unless attributes_for(@model_constant, :added_only => true).blank? %dl - attributes_for(@model_constant, :added_only => true).each do |attribute| %dt== #{attribute.titlecase}: - if @data_set.send(attribute).respond_to?("image?") = image_tag(@data_set.send(attribute).thumb('100x100#').url) %br = list_of_sizes_for(@data_set, attribute) %br - elsif @data_set.send(attribute).to_s.try(:include?,"/files/") - uploaded_file = @data_set.send(attribute) = link_to (uploaded_file.model.send("#{attribute}_filename") || uploaded_file.to_s), uploaded_file.url, :target => "_blank" %br - else %dd= @data_set.send(attribute) %br - relations_for(@model_constant, :ignore => ["route"]).each do |relation| %dt== #{relation.titlecase}: %dd - if @data_set.send(relation).is_a?(Array) - @data_set.send(relation).each do |res| = res.to_s.blank? ? "Nothing" : res.to_s = ", " unless res == @data_set.send(relation).last - else = @data_set.send(relation).to_s.blank? ? "Nothing" : @data_set.send(relation).to_s %br