tag:rubydoc.tenderapp.com,2010-12-26:/discussions/problems/327-broken-docs-page-for-shoulda-matchersRubydoc.info: Discussion 2016-07-26T20:45:21Ztag:rubydoc.tenderapp.com,2010-12-26:Comment/357071802015-01-06T19:30:44Z2015-01-06T19:30:44ZBroken docs page for shoulda-matchers<div><p>Where did you get the .rb link from?</p>
<p><a href=
"http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/lib/shoulda/matchers/active_record/have_db_index_matcher.rb">
http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/l...</a></p>
<p>Rubydoc should not be generating these links (we don't index
Ruby source files). If you're looking for the class
HaveDbIndexMatcher, then it's not available because it's marked
private:</p>
<p><a href=
"https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shoulda/matchers/active_record/have_db_index_matcher.rb#L72-L73">
https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shou...</a></p>
<p>What exactly are you looking for in the docs?</p></div>lsegaltag:rubydoc.tenderapp.com,2010-12-26:Comment/357071802015-01-06T19:57:49Z2015-01-06T19:57:49ZBroken docs page for shoulda-matchers<div><p>Sorry, I forgot to include the originating link. The top-level
shoulda-matchers page[1] has a link "have_db_index", which should
lead to the docs for that method. Note that all of the method links
on that page end in ".rb".</p>
<p>[1] <a href=
"http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/frames">
http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/master/f...</a></p></div>John Whitleytag:rubydoc.tenderapp.com,2010-12-26:Comment/357071802015-01-06T21:43:44Z2015-01-06T21:43:44ZBroken docs page for shoulda-matchers<div><p>I see now.</p>
<p>The links on that page are hardcoded links from the
shoulda-matchers documentation, so if they're pointing to the wrong
thing that's something that has to be fixed in that repository.</p>
<p>It looks like the links are setup to point to relative URLs,
which is not guaranteed to work:</p>
<p><a href=
"https://raw.githubusercontent.com/thoughtbot/shoulda-matchers/master/README.md">
https://raw.githubusercontent.com/thoughtbot/shoulda-matchers/maste...</a></p>
<p>FWIW, it <em>does</em> work from <a href=
"http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/file/README.md">
http://www.rubydoc.info/github/thoughtbot/shoulda-matchers/file/REA...</a></p>
<p>But that's only because the <code>/file/</code> part is already
in the URL. That won't work from the index page, and never should
have (I'm surprised it ever did).</p>
<p>The correct way to link to embedded files is to use the
<code>{file:FILENAME}</code> syntax in YARD.</p></div>lsegal