1
로그인하지 않았다고 가정합니다.
이 경우 mails_controller의 작업에 액세스 할 때이 플래시 알림이 표시됩니다.CanCan을 Devise와 함께 사용하면 플래시 메시지가 나타나지 않는 이유는 무엇입니까?
You need to sign in or sign up before continuing.
그러나 communities_controller에는 표시되지 않습니다.
왜? 어떻게 해결할 수 있습니까?
mails_controller.rb
class MailsController < ApplicationController
before_filter :authenticate_user!
....
end
communities_controller.rb
class CommunitiesController < ApplicationController
load_and_authorize_resource :find_by => :id
before_filter :authenticate_user!
end