Skip to content

Commit

Permalink
Restore original attributes after each action.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryotarai committed Jul 28, 2015
1 parent 4c05026 commit 28d33da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/itamae/resource/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ def run(specific_action = nil, options = {})
end

[specific_action || attributes.action].flatten.each do |action|
original_attributes = @attributes
run_action(action, options)
@attributes = original_attributes
end

verify unless options[:dry_run]
Expand Down

0 comments on commit 28d33da

Please sign in to comment.