Permalink
Browse files

sort links

  • Loading branch information...
1 parent 85c7ea2 commit fc5132aa408d266e0e0f0db39f42baeee1edf78e @grosser grosser committed Sep 10, 2011
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/mail_view.rb
View
@@ -24,10 +24,9 @@ def call(env)
path_info = env["PATH_INFO"]
if path_info == "" || path_info == "/"
- links = self.actions.inject({}) { |h, action|
- h[action] = "#{env["SCRIPT_NAME"]}/#{action}"
- h
- }
+ links = self.actions.map do |action|
+ [action, "#{env["SCRIPT_NAME"]}/#{action}"]
+ end
ok index_template.render(Object.new, :links => links)
elsif path_info =~ /([\w_]+)(\.\w+)?$/

0 comments on commit fc5132a

Please sign in to comment.