<% unless attachments.nil? || attachments.empty?%> <% attachments.each do |attachment|%> <% end %>
{:controller => 'welcome', :action => 'search',:search_type=>'attachment'}%>
<% end %>