Open jnraine opened 12 years ago
I ran into this exact error when "current_user" was not known when testing the use of Devise for authentication.
With Devise it provides a helper method "authenticated_user!" that is added as a before_filter to anything you want require authentication. So adding that to the application controller ensured that everything required authentication.
I'll run a test of trying to access a computer's show view with Devise and see if that fixes this error.
This is occurring the log message that occurs when I copy/paste a URL from a browser that with a valid session to another browser without a valid session.
Perhaps the before_filters are redirecting the user to the login page and an error happens to be raised because there are no units for this user because there is no user.