In appllication controller i have couple of methods that works with requested controller and action name.
To follow DRY principe, i want to define share variables with those params.
class ApplicationController < ActionController::Base
@@requested_action = params[:action]
@@requested_controller = params[:controller]
end
But i get error: undefined local variable or method "params" for ApplicationController:Class
Why i can't do this and how can i achieve my goal?