When using the Darkfish RDoc generator to generate RDoc documentation, next to methods there is a Click to toggle source
button next to each method. It isn't working for me when I generate my documentation, so how do you get that feature to work, do you have to add a keyword into your RDoc source or something?
views:
28answers:
2It seems to be enabled by default. I just tried a quick test with rdoc v2.5.11 :-
$ mkdir temp
$ cd temp
$ cat temp.rb
class MyClass
def my_method; end
end
$ rdoc
Parsing sources...
100% [ 1/ 1] temp.rb
Generating Darkfish...
Files: 1
Classes: 1 ( 1 undocumented)
Constants: 0 ( 0 undocumented)
Modules: 0 ( 0 undocumented)
Methods: 1 ( 1 undocumented)
0.00% documented
Elapsed: 0.1s
$ open doc/index.html
When I click on the link for #my_method
and I hover over the description of the method, I see the "click to toggle source" link and it works when I click it.
You will need javascript enabled in your browser to make this work.
I am having the same problem with my Rails3 code. Its pretty generic and I don't remember playing with the RDoc setup, but my click to toggle source
doesn't work either. I know that JS is turned on and their haven't been any errors when I run rake doc:app
so I'm not quite sure whats going on.
The only thing I can think of is that I'm running Ruby 1.9.2 / Rails 3.0.0 under RVM. Does that make a difference?
UPDATE: I noticed that its trying to load non-existent Javascript files from a js
directory. Is RDoc supposed to insert the JS files or are you supposed to do it manually?