Skip to content

Commit

Permalink
fixes highlighting for restful routes like person_path(@person)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeah authored and paolodona committed Apr 15, 2009
1 parent 3f70462 commit 291df06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/widgets/highlightable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def highlighted? options={}
h = clean_unwanted_keys(highlight)
h.each_key do |key| # for each key
# remove first slash from <tt>:controller</tt> key otherwise highlighted? could fail with urls such as {:controller => "/base"</tt>
h_key = h[key].to_s.dup
h_key = h[key].to_param.dup
h_key.gsub!(/^\//,"") if key == :controller
highlighted &= h_key==options[key].to_s
end
Expand Down

0 comments on commit 291df06

Please sign in to comment.