Adjust formatting on comments and on README for aesthetics. [ci skip]
This commit is contained in:
parent
44f2380ec6
commit
1a06106aab
|
@ -391,7 +391,7 @@ Undeleting is just as simple:
|
|||
>> widget = Widget.find 42
|
||||
>> widget.destroy
|
||||
# Time passes....
|
||||
>> widget = PaperTrail::Version.find(153).reify # the widget as it was before it was destroyed
|
||||
>> widget = PaperTrail::Version.find(153).reify # the widget as it was before destruction
|
||||
>> widget.save # the widget lives!
|
||||
```
|
||||
|
||||
|
@ -867,7 +867,8 @@ there is a configuration option that can be set to cap the number of versions sa
|
|||
versions other than `create` events (which will always be preserved if they are stored).
|
||||
|
||||
```ruby
|
||||
# will make it so that a maximum of 4 versions will be stored for each object (the 3 most recent ones plus a `create` event)
|
||||
# will make it so that a maximum of 4 versions will be stored for each object
|
||||
# (the 3 most recent ones plus a `create` event)
|
||||
>> PaperTrail.config.version_limit = 3
|
||||
# disables/removes the version limit
|
||||
>> PaperTrail.config.version_limit = nil
|
||||
|
@ -887,7 +888,7 @@ sql> delete from versions where created_at < 2010-06-01;
|
|||
|
||||
## Testing
|
||||
|
||||
You may want to turn PaperTrail off to speed up your tests. See the [Turning PaperTrail Off/On](#turning-papertrail-offon) section above.
|
||||
You may want to turn PaperTrail off to speed up your tests. See the [Turning PaperTrail Off/On](#turning-papertrail-offon) section above for tips on usage with `Test::Unit`.
|
||||
|
||||
### RSpec
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ module PaperTrail
|
|||
end
|
||||
|
||||
# Returns what changed in this version of the item. Cf. `ActiveModel::Dirty#changes`.
|
||||
# Returns nil if your `versions` table does not have an `object_changes` text column.
|
||||
# Returns `nil` if your `versions` table does not have an `object_changes` text column.
|
||||
def changeset
|
||||
return nil unless self.class.column_names.include? 'object_changes'
|
||||
|
||||
|
|
Loading…
Reference in New Issue