I get the TypeError (no implicit conversion of Hash into String) error on sign-in in my staging environment. The error cites the middle line in this method in my ApplicationController:
def after_sign_in_path_for(_resource_or_scope)
current_user && current_user.advice? ? advice_path : documents_path
end
and the advice? method on my User class:
def advice?
['Advice - TEST',
'Advice - Self Employed',
'Advice - Employed'].include?(brand.name)
end
My gem list returns this: devise (4.3.0, 3.5.10) which seems interesting, but it all works locally so it seems like it should remotely. I've changed my secret_token and my cookie store key, and I've run rake tmp:clear. Still the error persists. This is on Rails 5.1.3 and Ruby 2.4.1. Any ideas?
If I disable the ApplicationController method, I get the same error on DocumentsController where current_user is first mentioned, so obviously there's an error with the current_user method somehow.
Please use StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only. Thank you!