Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我似乎在任何地方都找不到这个......我正在尝试将仪表板添加到我的一个设计屏幕(注册/编辑),但我需要使一些变量可用。如何在不重写所有设计控制器逻辑的情况下做到这一点?
为此,您必须重写设计控制器,并调用父方法。
class RegistrationsController < Devise::RegistrationsController def edit super @your_var = 'something' end end