【发布时间】:2017-12-01 12:33:58
【问题描述】:
我正在尝试访问控制器外部和模型外部的current user。这是项目的架构
main_engine
|_bin
|_config
|_blorgh_engine
|_ —> this where devise is installed
|
|_ blorgh2_engine
|_app
|_assets
|_models
|_assets
|_queries
|_ filter_comments.rb -> Where I want to use current_user
module Blorgh2
# A class used to find comments for a commentable resource
class FilterComments < Rectify::Query
# How to get current_user here ?
...
end
end
我认为没有办法做到这一点。如果您有想法,欢迎您。
【问题讨论】:
标签: ruby-on-rails