There's a USER_METHOD in the LocaleSetter module, but unlike URL_PARAM and HTTP_HEADER, it's not used.
In User:
if user && user.respond_to?(:locale) && user.locale && !user.locale.empty?
LocaleSetter::Matcher.match(user.language, available)
end
Maybe this should look like:
if user && user.respond_to?(USER_METHOD) && user.send(USER_METHOD) && !user.send(USER_METHOD).empty?
LocaleSetter::Matcher.match(user.send(USER_METHOD), available)
end
There's a USER_METHOD in the LocaleSetter module, but unlike URL_PARAM and HTTP_HEADER, it's not used.
In User:
Maybe this should look like: