これは奇妙に聞こえるかもしれませんが、聞いてください...他のコントローラーの 1 つに対して POST 要求と同等のものを作成できる必要があります。はSimpleController
基本的に、より冗長なコントローラーの単純化されたバージョンです。どうすればこれを適切に行うことができますか?
class VerboseController < ApplicationController
def create
# lots of required params
end
end
class SimpleController < ApplicationController
def create
# prepare the params required for VerboseController.create
# now call the VerboseController.create with the new params
end
end
考えすぎかもしれませんが、やり方がわかりません。