You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.
From what I see, in the resource source code, resource guards are a list, that is append only.
Since I lost a bit of time to figure it out, I thought it would be nice to extend the docs, to help other folks in future
In short, calling rewind on the guard, just adds the new guard instead of removing the exiting one.
The workaround is similar to one mentioned for the notifications, unwind the whole resource, and add a new one without the guard.
def not_if(command=nil, opts={}, &block)
if command || block_given?
@not_if << Conditional.not_if(self, command, opts, &block) # APPEND ONLY LINE
end
@not_if
end
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From what I see, in the resource source code, resource guards are a list, that is append only.
Since I lost a bit of time to figure it out, I thought it would be nice to extend the docs, to help other folks in future
In short, calling rewind on the guard, just adds the new guard instead of removing the exiting one.
The workaround is similar to one mentioned for the notifications, unwind the whole resource, and add a new one without the guard.
The text was updated successfully, but these errors were encountered: