Skip to content

Commit c351fe5

Browse files
committed
Update README.md
1 parent 559daf9 commit c351fe5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Usage
134134
# article.save_queue.save
135135
# article.save
136136

137-
1. To save object _only_ if it was changed, include Dirty module described below.
137+
1. To save object _only_ if it was changed, include Dirty module described below in plugins section.
138138

139139
1. Continue reading for more details.
140140

@@ -170,7 +170,7 @@ Queue is not cleared after fail. Possible to fix errors and rerun queue.save
170170

171171
Plugins
172172
-------
173-
Any extract any "extra" functionality goes into bundled plugins.
173+
Any "extra" functionality goes into bundled plugins.
174174

175175
### Dirty
176176

@@ -195,8 +195,8 @@ In order to use it include this module and call #mark_as_changed method in mutat
195195
end
196196

197197
To mark object as saved, call #mark_as_saved method. SaveQueue Dirty plugin will automatically call
198-
\#mark_as_saved method after saving an object.
199-
This marks are used when SaveQueue calls #save. Object will be saved only, if it #has_unsaved_changes? method returns true.
198+
\#mark_as_saved method after saving an object. This marks are used when SaveQueue calls #save.
199+
Object will be saved only, if it #has_unsaved_changes? method returns true.
200200
There are some docs from spec tests:
201201

202202
#has_unsaved_changes?
@@ -224,7 +224,7 @@ If you have custom logic for marking objects dirty then you may want to overwrit
224224

225225
To use validation include SaveQueue::Plugins::Validation and implement #valid? method.
226226
Failed objects are stored in save_queue.errors\[:validation] array.
227-
\save_queue.errors are empty if no errors occurs
227+
save_queue.errors are empty if no errors occurs
228228

229229
require 'save_queue'
230230
require 'save_queue/plugins/validation'
@@ -298,7 +298,7 @@ Plugin adds SaveQueue::FailedValidationError:
298298

299299
# Note: queue was not saved. You dont need to do a cleanup
300300
unless article.save then
301-
failed_objects = article.errors[:validation]
301+
failed_objects = article.save_queue.errors[:validation]
302302
end
303303

304304
begin

0 commit comments

Comments
 (0)