Iている次のルートサブドメインが考案ルートで作業していない
constraints :subdomain => "brands" do
scope :module => "brands", :as => "brands" do
devise_for :members
# devise_for :users, controllers: {
# sessions: 'users/sessions'
# }
end
end
私はで次のエラー
ActionController :: RoutingErrorを取得しています
http://brands.lvh.me:3000/members/sign_up
に行く/メンバー/ sign_up未初期化ブランド:: RegistrationsControllerアプリケーション フレーム
ActionDispatch::Routing::RouteSet::Dispatcher#controller actionpack (4.2.5.2) lib/action_dispatch/routing/route_set.rb, line 63
登録コントローラー - `アプリ/コントローラ/ブランド/メンバー/ registrations_controller.rb
class Brands::Members::RegistrationsController < Devise::RegistrationsController
# before_action :configure_sign_up_params, only: [:create]
# before_action :configure_account_update_params, only: [:update]
# GET /resource/sign_up
# def new
# super
# end
# POST /resource
# def create
# super
# end
# GET /resource/edit
# def edit
# super
# end
# PUT /resource
# def update
# super
# end
# DELETE /resource
# def destroy
# super
# end
# GET /resource/cancel
# Forces the session data which is usually expired after sign
# in to be expired now. This is useful if the user wants to
# cancel oauth signing in/up in the middle of the process,
# removing all OAuth session data.
# def cancel
# super
# end
# protected
# If you have extra params to permit, append them to the sanitizer.
# def configure_sign_up_params
# devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
# end
# If you have extra params to permit, append them to the sanitizer.
# def configure_account_update_params
# devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
# end
# The path used after sign up.
# def after_sign_up_path_for(resource)
# super(resource)
# end
# The path used after sign up for inactive accounts.
# def after_inactive_sign_up_path_for(resource)
# super(resource)
# end
end
スコープ 'スコープ:module =>" brands "、:as =" brand "do"を削除するとうまくいくと思います。 –
@MuhammadYawarAliしかし、私のコントローラとビューには名前が付いています –
私のマルチテナントアプリでは、サブドメインとロケールのスコープはすべてあなたのように見えます。私が持っている唯一の違いは、私がオーバーライドしているコントローラの開発です。おそらく同じオーバーライドを行うことができますが、デバイスコントローラから継承した空のコントローラーを使用することができます。そして、ルートで 'devise_for:members、controllers:{:sessions =>" your_scope/sessions "}'と指定するだけです。 –