Answer the question
In order to leave comments, you need to log in
How to add alternative action "create?
The alternative "new" action is added with the ":on" parameter, but what about the "create" action?
Should a single "create" action handle all of these alternate "new" actions?
For example, I want to implement three alternative "new" actions:
resources :offer, except: [:destroy] do
get 'text', on: :new
get 'image', on: :new
get 'video', on: :new
end
Answer the question
In order to leave comments, you need to log in
class MyController < ApplicationController
def new
redirect_to action: 'create1'
end
def create1
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question