I have a challenge object in my database and one of the actions is to accept a challenge. A challenge has a state and when a challenge is accepted it does a variety of things including creating a game and setting the challenge state to accepted. I’m debating between two approaches, but feel free to suggest a 3rd.
Update action on challenge controller
class ChallengesController < ApplicationController
do accept challenge action
2 Update action on accept_challenge controller
class AcceptChallengesController < ApplicationController def update Do accept challenge action end end