Partials layouts

In partial I have something like this:

<% if @first == 'x' %>
xxx: <%= @data.xxx %>
yyy: <%= @data.yyy %>
<% else %>
yyy: <%= @data.yyy %>
xxx: <%= @data.xxx %>
<% end %>
zzz: <%= @data.zzz %>
qqq: <%= @data.qqq %>

Is there any better way to do this?

I don't like, that there are same lines 2 times.

Controller says:
   @order = [ 'xxx', 'yyy' ]

View:
<% @order.each do |a| %>
<%= a %>: <%= @data.send(a) %>
<% end %>
zzz: <%= @data.zzz %>
qqq: <%= @data.qqq %>

Or go all the way and:
   @order = ['xxx', 'yyy', 'zzz', 'qqq']

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com