Hello,

I'm trying to DRY up my links on my layout by doing this:

<% ['activity', 'submitted', 'saved', 'comments'].each do |action| %>
  <%= link_to_unless_current action.capitalize,
"user_#{action}_url(:login => @user.login)" do
            link_to_unless_current action.capitalize,
"user_#{action}_url(:login => @user.login), {:class => 'current'})"
          end %>
<% end %>

I've tried to self.send the user_xxx_url to the ActionView, but the
route method is undefined in the ActionView class.  I'm looking at the
call stack for named routes, but thought I'd throw it out there while
I'm doing my research to possibly get a solution faster.

Thanks,
Tom


--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to