From 6ab9f2bb407194ada0973301d55525ad79e1ff78 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 7 Nov 2005 09:51:47 +0000 Subject: Fix READMEs (closes #2680) [coffee2code] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/README | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'activerecord/README') diff --git a/activerecord/README b/activerecord/README index bffa2ab65d..1be4df6189 100755 --- a/activerecord/README +++ b/activerecord/README @@ -1,14 +1,14 @@ = Active Record -- Object-relation mapping put on rails Active Record connects business objects and database tables to create a persistable -domain model where logic and data is presented in one wrapping. It's an implementation +domain model where logic and data are presented in one wrapping. It's an implementation of the object-relational mapping (ORM) pattern[http://www.martinfowler.com/eaaCatalog/activeRecord.html] by the same name as described by Martin Fowler: "An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data." -Active Records main contribution to the pattern is to relieve the original of two stunting problems: +Active Record's main contribution to the pattern is to relieve the original of two stunting problems: lack of associations and inheritance. By adding a simple domain language-like set of macros to describe the former and integrating the Single Table Inheritance pattern for the latter, Active Record narrows the gap of functionality between the data mapper and active record approach. @@ -157,7 +157,7 @@ A short rundown of the major features: pkId = 1234 cat = Cat.find(pkId) - # something even more interesting involving a the same cat... + # something even more interesting involving the same cat... cat.save {Learn more}[link:classes/ActiveRecord/Base.html] @@ -189,7 +189,7 @@ A short rundown of the major features: Data definitions are specified only in the database. Active Record queries the database for the column names (that then serves to determine which attributes are valid) on regular -objects instantiation through the new constructor and relies on the column names in the rows +object instantiation through the new constructor and relies on the column names in the rows with the finders. # CREATE TABLE companies ( @@ -235,7 +235,7 @@ Active Record will also automatically link the "Person" object to the "people" t == Simple example (2/2): Using the domain -Picking a database connection for all the active records +Picking a database connection for all the Active Records ActiveRecord::Base.establish_connection( :adapter => "mysql", @@ -300,9 +300,9 @@ It's also highly recommended to have a look at the unit tests. Read more in link == Philosophy -Active Record attempts to provide a coherent wrapping for the inconvenience that is +Active Record attempts to provide a coherent wrapper as a solution for the inconvenience that is object-relational mapping. The prime directive for this mapping has been to minimize -the amount of code needed to built a real-world domain model. This is made possible +the amount of code needed to build a real-world domain model. This is made possible by relying on a number of conventions that make it easy for Active Record to infer complex relations and structures from a minimal amount of explicit direction. @@ -357,4 +357,4 @@ RubyForge page at http://rubyforge.org/projects/activerecord. And as Jim from Ra new feature to be submitted in the form of new unit tests. For other information, feel free to ask on the ruby-talk mailing list -(which is mirrored to comp.lang.ruby) or contact mailto:david@loudthinking.com. \ No newline at end of file +(which is mirrored to comp.lang.ruby) or contact mailto:david@loudthinking.com. -- cgit v1.2.3