%= render_crud do %>
<%= field[:sf][:label].to_s.mb_chars.upcase.to_s %> | <% else %><%= field[:attribute].to_s.mb_chars.upcase.to_s %> | <% end %> <% if @model.columns_hash[field[:attribute].to_s].present? && [:date, :datetime].include?(@model.columns_hash[field[:attribute].to_s].type)%> <% if field[:date_format].present?%><%= l @record.send(field[:attribute]).strftime(field[:date_format]) if @record.send(field[:attribute]).present?%> | <% else %><%= l @record.send(field[:attribute]) if @record.send(field[:attribute]).present?%> | <% end %> <% elsif @model.reflect_on_association(field[:attribute]) && @model.reflect_on_association(field[:attribute]).macro != :belongs_to && @model.reflect_on_association(field[:attribute]).macro != :has_one%>
<% @record.send(field[:attribute]).each do |rec| %>
|
<% elsif @record.send(field[:attribute]).class == Array %>
<% @record.send(field[:attribute]).each do |rec| %>
|
<% elsif @record.send(field[:attribute]).respond_to?(:url) %>
<%= render_field_file(@record.send(field[:attribute])) %> | <% elsif ["false","true"].include? @record.send(field[:attribute]).to_s %><%= @record.send(field[:attribute]) ? "Sim" : "Não" %> | <% else %><% if field[:sf].present? && field[:sf][:label_method].present? && @record.send(field[:attribute]).present?%> <%= @record.send(field[:attribute]).send(field[:sf][:label_method]) %> <% else %> <%= @record.send(field[:attribute]) %> <% end %> | <% end %>
---|