How do I get the current action from a controller?

advertisements

How do I get the current action from within a controller? current_page? works for views, but not controllers.

redirect_to step3_users_path unless current_page?(step3_users_path)

I also tried

controller.action_name == 'step3'

I also tried

params[:action_name] == 'step3'


Controllers have action_name method/accessor (defined in AbstractController::Base for current rails, ActionController::Base for older)