search for: new_adminblah_path

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

2010 Apr 20
5
Spring Cleaning
...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 it? :) Would he create a helper of some sort? Because I feel like I''m repeating myself a lot in the code. What hap...