Executing a random method [closed]
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I am trying to make a logic for executing a random method. Let's say for example I have 10 methods, I need to run one of them selected at random. The main method will reside in the ActionController of my Rails 3.2 app which will have the logic and the 10 methods inside. 回答1: Pick a random method