Skip to content

Commit

Permalink
To solve the problem of links being broken in GitHub for the sake of …
Browse files Browse the repository at this point in the history
…api site, have them replaced at runtime during rdoc generation
  • Loading branch information
vijaydev committed Jun 18, 2011
1 parent 2fbb750 commit 96c57d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ you to present the data from database rows as objects and embellish these data o
with business logic methods. Although most Rails models are backed by a database, models
can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as
provided by the ActiveModel module. You can read more about Active Record in its
{README}[link:files/activerecord/README_rdoc.html].
{README}[link:blob/master/activerecord/README.rdoc].

The Controller layer is responsible for handling incoming HTTP requests and providing a
suitable response. Usually this means returning HTML, but Rails controllers can also
Expand All @@ -29,7 +29,7 @@ In Rails, the Controller and View layers are handled together by Action Pack.
These two layers are bundled in a single package due to their heavy interdependence.
This is unlike the relationship between the Active Record and Action Pack which are
independent. Each of these packages can be used independently outside of Rails. You
can read more about Action Pack in its {README}[link:files/actionpack/README_rdoc.html].
can read more about Action Pack in its {README}[link:blob/master/actionpack/README.rdoc].

== Getting Started

Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RDoc::Task.new do |rdoc|
# since no autolinking happens there and RDoc displays the backslash
# otherwise.
rdoc_main.gsub!(/^(?=\S).*?\b(?=Rails)\b/) { "#$&\\" }
rdoc_main.gsub!(/link:blob\/master\/(\w+)\/README.rdoc/, "link:files/\\1/README_rdoc.html")

File.open(RDOC_MAIN, 'w') do |f|
f.write(rdoc_main)
Expand Down

0 comments on commit 96c57d4

Please sign in to comment.