Czy to ma sens czy mnie poniosło?
[code]<% [“name”, “surname”, “email”, “twitter_id”, “facebook”, “website”, “phone_number”, “city”, “postal_code”].each do |attr_event| %>
<% if @event.send(attr_event.to_sym) != 0 %>
<p><%= f.label attr_event.to_sym, attr_event.capitalize %><%= " - required" if @event.send(attr_event.to_sym) == 2 %><br/>
<%= f.text_field attr_event %></p>
<% end -%>
<% end -%>[/code]