Sha256: b6f77a2bf9ac198b143fcc7dc7fd14366be07c8518abde622ba2035359f25ca9

Contents?: true

Size: 1.43 KB

Versions: 8

Compression:

Stored size: 1.43 KB

Contents

%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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
brick_layer-0.10.6 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.10.5 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.10.3 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.10.2 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.10.1 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.10.0 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.9.6 app/views/brick_layer/data_sets/show.html.haml
brick_layer-0.9.4 app/views/brick_layer/data_sets/show.html.haml