some of the changes for validation earlier reverted from d20281a

This commit is contained in:
Vijay Dev
2011-09-03 01:40:00 +05:30
parent 78497c7c27
commit f83f169b85
3 changed files with 6 additions and 4 deletions

View File

@@ -163,12 +163,14 @@ person.first_name_changed? #=> true
</ruby>
Track what was the previous value of the attribute.
<ruby>
#attr_name_was accessor
person.first_name_was #=> "First Name"
</ruby>
Track both previous and current value of the changed attribute. Returns an array if changed else returns nil
<ruby>
#attr_name_change
person.first_name_change #=> ["First Name", "First Name 1"]

View File

@@ -132,7 +132,7 @@ SELECT * FROM clients ORDER BY clients.id DESC LIMIT 1
<tt>Model.last</tt> returns +nil+ if no matching record is found. No exception will be raised.
h5. +first!+
h5(#first_1). +first!+
<tt>Model.first!</tt> finds the first record. For example:
@@ -149,7 +149,7 @@ SELECT * FROM clients LIMIT 1
<tt>Model.first!</tt> raises +RecordNotFound+ if no matching record is found.
h5. +last!+
h5(#last_1). +last!+
<tt>Model.last!</tt> finds the last record. For example:

View File

@@ -207,7 +207,7 @@ GC Time measures the amount of time spent in GC for the performance test case.
h5. Metric Availability
h6. Benchmarking
h6(#benchmarking_1). Benchmarking
|_.Interpreter|_.Wall Time|_.Process Time|_.CPU Time|_.User Time|_.Memory|_.Objects|_.GC Runs|_.GC Time|
|_.MRI | yes | yes | yes | no | yes | yes | yes | yes |
@@ -215,7 +215,7 @@ h6. Benchmarking
|_.Rubinius | yes | no | no | no | yes | yes | yes | yes |
|_.JRuby | yes | no | no | yes | yes | yes | yes | yes |
h6. Profiling
h6(#profiling_1). Profiling
|_.Interpreter|_.Wall Time|_.Process Time|_.CPU Time|_.User Time|_.Memory|_.Objects|_.GC Runs|_.GC Time|
|_.MRI | yes | yes | no | no | yes | yes | yes | yes |