From ad3cdb13bf409e2adb1a09c5aa902c6d12a0257a Mon Sep 17 00:00:00 2001 From: Joost Baaij Date: Thu, 19 Aug 2010 22:41:11 +0200 Subject: [PATCH] Replaces relative rdoc links with hyperlinks to the Rails API documentation. Fixes the currently broken links in the top level README. Also makes github render these files nicely as rdoc instead of plain text. Has the added benefit of referring to a known source on the web. This commit does not touch other relative rdoc links, e.g. those in the app generator or inline comments. --- README.rdoc | 4 ++-- actionpack/README.rdoc | 20 ++++++++++---------- activemodel/README.rdoc | 20 ++++++++++---------- activerecord/README.rdoc | 28 ++++++++++++++-------------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/README.rdoc b/README.rdoc index 2e5e72c..6cfd85d 100644 --- a/README.rdoc +++ b/README.rdoc @@ -15,7 +15,7 @@ In Rails, the model is handled by what's called an object-relational mapping layer entitled Active Record. This layer allows you to present the data from database rows as objects and embellish these data objects with business logic methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. +http://api.rubyonrails.org/files/activerecord/README.html. The controller and view are handled by the Action Pack, which handles both layers by its two parts: Action View and Action Controller. These two layers @@ -23,7 +23,7 @@ are bundled in a single package due to their heavy interdependence. This is unlike the relationship between the Active Record and Action Pack that is much more separate. Each of these packages can be used independently outside of Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. +http://api.rubyonrails.org/files/actionpack/README.html. == Getting Started diff --git a/actionpack/README.rdoc b/actionpack/README.rdoc index 0ad33cf..e1e8ff5 100644 --- a/actionpack/README.rdoc +++ b/actionpack/README.rdoc @@ -54,7 +54,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActionController/Base.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionController/Base.html] * ERb templates (static content mixed with dynamic output from ruby) @@ -69,7 +69,7 @@ A short rundown of some of the major features: Not for clients to see... <% end %> - {Learn more}[link:classes/ActionView.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionView.html] * "Builder" templates (great for XML content, like RSS) @@ -94,7 +94,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActionView/Base.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionView/Base.html] * Filters for pre- and post-processing of the response @@ -124,7 +124,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActionController/Filters/ClassMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionController/Filters/ClassMethods.html] * Helpers for forms, dates, action links, and text @@ -133,7 +133,7 @@ A short rundown of some of the major features: <%= link_to "New post", :controller => "post", :action => "new" %> <%= truncate(post.title, :length => 25) %> - {Learn more}[link:classes/ActionView/Helpers.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionView/Helpers.html] * Layout sharing for template reuse @@ -154,7 +154,7 @@ A short rundown of some of the major features: Result of running hello_world action:

Hello world

- {Learn more}[link:classes/ActionController/Layout/ClassMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html] * Routing makes pretty URLs incredibly easy @@ -172,7 +172,7 @@ A short rundown of some of the major features: redirect_to(:client_name => "nextangle", :project_name => "rails") => /clients/nextangle/rails/project/index - {Learn more}[link:classes/ActionDispatch/Routing.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionDispatch/Routing.html] * Easy testing of both controller and rendered template through ActionController::TestCase @@ -185,7 +185,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActionController/TestCase.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionController/TestCase.html] * Automated benchmarking and integrated logging @@ -236,7 +236,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActionController/Caching.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionController/Caching.html] * Powerful debugging mechanism for local requests @@ -246,7 +246,7 @@ A short rundown of some of the major features: message, stack trace, request parameters, session contents, and the half-finished response. - {Learn more}[link:classes/ActionController/Rescue.html] + {Learn more}[http://api.rubyonrails.org/classes/ActionController/Rescue.html] == Simple example (from outside of Rails) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 9b96bfa..88fab5e 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -32,7 +32,7 @@ modules: person.clear_name person.clear_age - {Learn more}[link:classes/ActiveModel/AttributeMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/AttributeMethods.html] * Callbacks for certain operations @@ -50,7 +50,7 @@ modules: This generates +before_create+, +around_create+ and +after_create+ class methods that wrap your create method. - {Learn more}[link:classes/ActiveModel/CallBacks.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/CallBacks.html] * Tracking value changes @@ -67,7 +67,7 @@ modules: person.save person.previous_changes # => {'name' => ['bob, 'robert']} - {Learn more}[link:classes/ActiveModel/Dirty.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Dirty.html] * Adding +errors+ interface to objects @@ -99,7 +99,7 @@ modules: person.errors.full_messages # => ["Name Can not be nil"] - {Learn more}[link:classes/ActiveModel/Errors.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Errors.html] * Model name introspection @@ -110,7 +110,7 @@ modules: NamedPerson.model_name # => "NamedPerson" NamedPerson.model_name.human # => "Named person" - {Learn more}[link:classes/ActiveModel/Naming.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Naming.html] * Observer support @@ -118,7 +118,7 @@ modules: pattern in a Rails App and take advantage of all the standard observer functions. - {Learn more}[link:classes/ActiveModel/Observer.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Observer.html] * Making objects serializable @@ -130,7 +130,7 @@ modules: s.to_json # => "{\"name\":null}" s.to_xml # => "\n "My attribute" - {Learn more}[link:classes/ActiveModel/Translation.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Translation.html] * Validation support @@ -159,7 +159,7 @@ modules: person.first_name = 'zoolander' person.valid? # => false - {Learn more}[link:classes/ActiveModel/Validations.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validations.html] * Custom validators @@ -181,4 +181,4 @@ modules: p.name = "Bob" p.valid? # => true - {Learn more}[link:classes/ActiveModel/Validator.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validator.html] diff --git a/activerecord/README.rdoc b/activerecord/README.rdoc index 1a0db46..1cd94b8 100644 --- a/activerecord/README.rdoc +++ b/activerecord/README.rdoc @@ -32,7 +32,7 @@ A short rundown of some of the major features: This would also define the following accessors: `Product#name` and `Product#name=(new_name)` - {Learn more}[link:classes/ActiveRecord/Base.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Base.html] * Associations between objects defined by simple class methods. @@ -43,7 +43,7 @@ A short rundown of some of the major features: belongs_to :conglomerate end - {Learn more}[link:classes/ActiveRecord/Associations/ClassMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html] * Aggregations of value objects. @@ -55,7 +55,7 @@ A short rundown of some of the major features: :mapping => [%w(address_street street), %w(address_city city)] end - {Learn more}[link:classes/ActiveRecord/Aggregations/ClassMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Aggregations/ClassMethods.html] * Validation rules that can differ for new or existing objects. @@ -67,7 +67,7 @@ A short rundown of some of the major features: validates_confirmation_of :password, :email_address, :on => :create end - {Learn more}[link:classes/ActiveRecord/Validations.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Validations.html] * Callbacks available for the entire lifecycle (instantiation, saving, destroying, validating, etc.) @@ -77,7 +77,7 @@ A short rundown of some of the major features: # the `invalidate_payment_plan` method gets called just before Person#destroy end - {Learn more}[link:classes/ActiveRecord/Callbacks.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html] * Observers that react to changes in a model @@ -88,7 +88,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActiveRecord/Observer.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Observer.html] * Inheritance hierarchies @@ -98,7 +98,7 @@ A short rundown of some of the major features: class Client < Company; end class PriorityClient < Client; end - {Learn more}[link:classes/ActiveRecord/Base.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Base.html] * Transactions @@ -109,7 +109,7 @@ A short rundown of some of the major features: mary.deposit(100) end - {Learn more}[link:classes/ActiveRecord/Transactions/ClassMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html] * Reflections on columns, associations, and aggregations @@ -118,7 +118,7 @@ A short rundown of some of the major features: reflection.klass # => Client (class) Firm.columns # Returns an array of column descriptors for the firms table - {Learn more}[link:classes/ActiveRecord/Reflection/ClassMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Reflection/ClassMethods.html] * Database abstraction through simple adapters @@ -135,10 +135,10 @@ A short rundown of some of the major features: :database => "activerecord" ) - {Learn more}[link:classes/ActiveRecord/Base.html] and read about the built-in support for - MySQL[link:classes/ActiveRecord/ConnectionAdapters/MysqlAdapter.html], - PostgreSQL[link:classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html], and - SQLite3[link:classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html]. + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Base.html] and read about the built-in support for + MySQL[http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/MysqlAdapter.html], + PostgreSQL[http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html], and + SQLite3[http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html]. * Logging support for Log4r[http://log4r.sourceforge.net] and Logger[http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc] @@ -167,7 +167,7 @@ A short rundown of some of the major features: end end - {Learn more}[link:classes/ActiveRecord/Migration.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveRecord/Migration.html] == Philosophy -- 1.7.0.3