~vcs-imports/rails/trunk

« back to all changes in this revision

Viewing changes to activerecord/README

  • Committer: pratik
  • Date: 2008-04-05 03:52:58 UTC
  • Revision ID: vcs-imports@canonical.com-20080405035258-83rgxjkgjpb4yef2
Improve documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
  {Learn more}[link:classes/ActiveRecord/Base.html]
103
103
 
104
104
 
105
 
* Transaction support on both a database and object level. The latter is implemented 
106
 
  by using Transaction::Simple[http://railsmanual.com/module/Transaction::Simple]
 
105
* Transactions
107
106
 
108
 
    # Just database transaction
 
107
    # Database transaction
109
108
    Account.transaction do
110
109
      david.withdrawal(100)
111
110
      mary.deposit(100)
112
111
    end
113
112
 
114
 
    # Database and object transaction
115
 
    Account.transaction(david, mary) do
116
 
      david.withdrawal(100)
117
 
      mary.deposit(100)
118
 
    end
119
 
 
120
113
  {Learn more}[link:classes/ActiveRecord/Transactions/ClassMethods.html]
121
114
 
122
115