How does one use the Ruby on Rails method performed? in an if else statement?
I tried to use this StackOverflow anwser in my example below:
if condition
does something
elsif redirect_to(records_path)
performed?
does another thing
else
yet another thing
end
But this only redirects without checking if it is performed.
I want it to check if the redirect to records_path is performed and when true do something (or "does another thing" in my example)
I also tried this:
elseif records_path.performed?
And this:
elseif redirect_to(records_path) performed?()
And all things in between.
Can somebody explain how it's done and how I could've get it from the docs?