views:

92

answers:

2

When I navigate to:

http://localhost:3000/users/1

I get a page that says simply:

Unknown action

No action responded to show. 

Actions: 
create, current_user, logged_in?, login_required, 
new, and redirect_to_target_or_default
  1. Isn't this a security risk since it tells users of my app exactly which methods are available in my Users controller?

  2. Why does it display the available actions and can it be configured not to?

+2  A: 

In production mode you don't see any debug message like that.
Start script/server -e production to see.

Carmine Paolino
+1  A: 

As earcar says, that error output is only displayed when running in development mode but that does look a little odd to me. Have you defined current_user, logged_in?, login_required, and redirect_to_target_or_default as public methods in your UserController? If so you'll want to move those to your ApplicationController and declare them as private, like this AuthLogic example demonstrates.

fractious
N.B. Fixed example AuthLogic example link, underscores were getting munged somewhere along the line.
fractious