Railsアプリを持っています。すべてのコントローラーは、から継承するからBaseController
継承しApplicationController::Base
ます。これは、パーシャルを個別の名前空間に編成するためのものです。それは素晴らしい働きをします。
ここに問題があります。
Devise gemを使用しようとしていますが、Devise::SessionsController
Baseという名前のフォルダーに保存されているパーシャルが見つかりません。Devise::SessionsController
私の解決策は、次のように継承したローカルコントローラーを作成することでした。
module Account
class SessionsController < Devise::SessionsController
end
end
問題は、このローカルがまだ私のパーシャルを見つけることができるようにSessionsController
私から継承する必要があるということです。BaseController
わかる?
BaseControllerコード:
module Account
class BaseController < ApplicationController
end
end
ApplicationControllerコード:
class ApplicationController < ActionController::Base
protect_from_forgery
end
I've been reading about mixins, but can't see how I can use mixins to solve this problem, because I don't have any methods to import from the class ...