in my ApplicationController I want to do something like this:
def layout_by_resource
if user_signed_in? || request.controller == 'ChatRoom'
"application"
else
"unauthorized"
end
end
Is request.controller == 'ChatRoom' possible ? I want to use a specific layout based on a controller called by the user.
thank
source
share