Skip to content

Commit

Permalink
change template
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Mar 18, 2011
1 parent 55c53a0 commit d2361ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/promomailer/promo_order.rhtml
@@ -1,11 +1,13 @@
*<%=@order[:amount]%>* PromoDVDs to <%=@order[:name]%> <<%=@order[:email]%>>

CSV:
<%= @order.attributes.keys.join(', ') %>
<%= @order.attributes.values.each{|v| v.to_s.gsub!(",", "-") }.join(', ') %>
<% attributes = %w( title name company street1 street2 zip city county country phone email amount material reason deadline created_at ) -%>
<%= attributes.join(', ') %>
<%= attributes.map{|a| @order[a].to_s.gsub(",", "-")}.join(', ') %>

Pretty print:
<%=@order[:title]%> <%=@order[:name]%>
<%=@order[:company]%>
<%=@order[:street1]%>
<%=@order[:street2]%>
<%=@order[:zip]%> *<%=@order[:city]%>*
Expand Down

0 comments on commit d2361ff

Please sign in to comment.