Sha256: 128003ba947987f49e8a52520635f82393cc281f28a6d6c56a9ecd71c89f1fa3
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
<h4 style="text-decoration:underline"><%=h @subject %></h4> <% @form.class.form_attributes.each do |attribute| value = @form.send(attribute) next if value.blank? %> <p><b><%= @form.class.human_attribute_name(attribute) %>:</b> <%= value.include?("\n") ? simple_format(h(value)) : h(value) %></p> <% end %> <% unless @form.class.form_appendable.blank? %> <br /><h4 style="text-decoration:underline"><%= I18n.t :title, :scope => [ :mail_form, :request ], :default => 'Request information' %></h4> <% @form.class.form_appendable.each do |attribute| value = @form.request.send(attribute) value = if value.is_a?(Hash) && !value.empty? content_tag(:ul, value.to_a.map{|k,v| content_tag(:li, h("#{k}: #{v.inspect}")) }.join("\n"), :style => "list-style:none;") elsif value.is_a?(String) h(value) else h(value.inspect) end %> <p><b><%= I18n.t attribute, :scope => [ :mail_form, :request ], :default => attribute.to_s.humanize %>:</b> <%= value.include?("\n") ? simple_format(value) : value %></p> <% end %> <br /> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mail_form-1.0.0 | views/mail_form/notifier/contact.erb |