Skip to content
Browse files

* faking aref for attrs.

  • Loading branch information...
1 parent c42e62d commit 1ddffeb17498022ae55ab37c06142284a882a26f Erik Hollensbe committed Jul 12, 2010
Showing with 4 additions and 1 deletion.
  1. +2 −0 lib/hanna/template_files/method_list.haml
  2. +2 −1 lib/hanna/template_files/sections.haml
View
2 lib/hanna/template_files/method_list.haml
@@ -21,6 +21,8 @@
%li= link_to method.call_seq.gsub(/<br\s*\/?>/, "").split(/[\r\n]+/).map{ |s| s.split(/([({]+|\[\{|\s+(#?=>|&rarr;)\s+)/).first.sub(/^[A-Za-z0-9_:]+\./, "").sub(/\s+=\s+.*/, "=").strip }.uniq.join("<br />\n"), '#' + method.aref
- else
%li= link_to method.name, '#' + method.aref
+ - elsif method.respond_to?(:html_name)
+ %li= link_to method.name, "#method-#{method.html_name}"
- else
%li= method.name
View
3 lib/hanna/template_files/sections.haml
@@ -47,7 +47,8 @@
%table
- section[:attributes].each do |attrib|
%tr.top-aligned-row.context-row
- %td.context-item-name= attrib.name
+ %td.context-item-name
+ %a{:name => "method-#{attrib.html_name}"}=attrib.name
%td.context-item-value= attrib.rw ? "[#{attrib.rw}]" : '&nbsp;'
%td.context-item-desc~ sanitize_code_blocks(attrib.description)

0 comments on commit 1ddffeb

Please sign in to comment.
Something went wrong with that request. Please try again.