actionをOptionsController
含む がありますaccount
。対応するビューには 3 つのフォームがあり、3 つの異なるアクション、update_profile
、update_user
およびに投稿されchange_password
ます。action
各アクションが実行され、ビューが再度設定されてレンダリングされる にリダイレクトされます。
after_filter
私はDRYになり、リダイレクトを行うために作成しようとしていました:
after_filter( :only => [:change_password, :update_profile, :update_user] ) do |controller|
controller.send(:redirect_to, :action => :account)
end
ただし、これは呼び出されないようです。むしろ、アクションはビューが見つからないことを訴えます。
Template is missing
Missing template options/update_user.erb in view path app/views
これを DRY の方法で行う方法はありますか、または 3 つのアクションのそれぞれで redirect_to 呼び出しをそのままにしておく必要がありますか?