From b7c7e1c0212d726dd9f56073d2cf80c33d6390a0 Mon Sep 17 00:00:00 2001 From: Ben Atkins Date: Fri, 12 Oct 2012 19:32:27 -0400 Subject: [PATCH] Adding a bit of clarification to the README portion explaining the :only and :ignore options for the has_paper_trail method. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66705350..38b9dc1e 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ This means that changes to just the `title` or `rating` will not store another v >> a.versions.length # 1 >> a.update_attributes :title => 'My Title', :rating => 3 >> a.versions.length # 1 ->> a.update_attributes :content => 'Hello' +>> a.update_attributes :title => 'Greeting', :content => 'Hello' >> a.versions.length # 2 >> a.previous_version.title # 'My Title' ``` @@ -245,6 +245,7 @@ This means that only changes to the `title` will save a version of the article: >> a.versions.length # 2 >> a.update_attributes :content => 'Hello' >> a.versions.length # 2 +>> a.previous_version.content # nil ``` Passing both `:ignore` and `:only` options will result in the article being saved if a changed attribute is included in `:only` but not in `:ignore`.