In rails, I need to check the name of the previous method in the controller. For example: There are methods A, B, C ... etc .; In the controller, I want to execute several statements only if it starts from method A. How to write a condition for this? I saw a lot of links that talked about the name of the current action and the name of the controller, but that was not what I needed. I need to get the name of the previous method. Thanks in advance.
source share