search for: new_blah_path

Displaying 1 result from an estimated 1 matches for "new_blah_path".

2010 Apr 20
5
Spring Cleaning
...ff in my view. I have a ginourmous chunk of if and else statements in my views... is there a way to make it prettier? The if and else''s almost all have the same functions, expect for some minor changes. Like this- <% if current_user %> <%= link_to "Create a new BLAH", new_blah_path %> <% end %> <% if current_admin %> <%= link_to "Create a new ADMINBLAH", new_adminblah_path %> <% end %> BUT I have a LOT LOTLOT of them... all basically doing the same things, with the path changed. Now, in this situation, how would david h hansson do...