在rails 3.2.8应用程序中,我们为用户身份验证创建了一个可安装rails的引擎authentify
。我们的问题是在rails app(主应用)或引擎authentify
中创建会话表的位置?
如果我们在rails app中创建会话表,那么访问会话变量将与具有会话[:variable_name]的常规rails应用程序相同。我们测试了在引擎验证中创建会话表,并且在其他rails引擎中无法使用session[:user_id]
访问authentify中定义的session[:user_id]
。 authentify_session[:user_id]
效果不佳。