我在我的應用程序上實現了設計創意,我想在sign_up之後重定向到特定路徑。我在registration_controller.rb中有此方法,但它不起作用,它將重定向到根路徑而不是指定的路徑。我也有devise :confirmable
成立,但我延遲發送確認電子郵件,直到後來。在註冊之後和確認之前設計重定向路徑
def after_sign_up_path_for(resource)
new_transaction_path(session[:registration_params])
end
並返回以下閃光燈通知:translation missing: en.devise.registrations.store.signed_up_but
我怎樣才能使這項工作?
什麼是會議的下列[:registration_params]?可能你需要傳遞資源 – Vishal
你也可以試試def'after_inactive_sign_up_path_for(resource) new_transaction_path(resource) end' – Vishal
感謝你的回覆@Vishal ....我在查詢字符串中添加參數到一個路徑它是new_store_registration,並在store_registration控制器中點擊新操作時將它們存儲在會話中,然後在after_sign_up_path_for方法中檢索它們。 – Theopap