I have this helper method:
def pick_index_paths_new
case params[:type]
when 'eood', 'ood'
content_tag :li , :class => 'link_list' do
link_to "New EOOD", new_eood_path
link_to "New OOD" , new_ood_path
end
when 'llc' , 'ccompany' , 'scompany'
content_tag :li, :class => 'link_list' do
link_to "New LLC" , new_llc_path
link_to "New C Company" , new_ccompany_path
link_to "New S Company" , new_scompany_path
end
else link_to "New" , new_resource_path , :data => { :no_turbolink => true }
end
end
Here's how it looks I in the view:
<div class="row">
<div class="container">
<ul class="tabs">
<%= pick_index_paths_new %>
</ul>
<table class='table'>
<thead>
<tr>
!-- some other stuff --
When I load my page, only the last link is visible (Either "New OOD" or New SCompany") .
I tried putting all the logic in my view, and it works properly there (but it is outright gruesome)
What am I doing wrong? What do I have to change so that the helper method will render all links?