mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
some of the changes for validation earlier reverted from d20281a
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user