I’m working through a Rails tutorial and saw the following code:
class UsersController < ApplicationController
before_filter :authenticate, :only => [:edit, :update]
before_filter :correct_user, :only => [:edit, :update]
deny_access unless signed_in?
@user = User.find(params[:id])
redirect_to(root_path) unless current_user?(@user)
Why are authenticate and correct_user private methods? Would it be
harmful if they were made public? What would be the consequences?