I am using a before action to execute an action called "can_accede" (this is in my aplication_controller) before accessing my index view, this action will look for a record to verify if the user can access my index view, but I need to send a parameter to that action to know what record to look for.
this is my "can_accede" action
@can_accede = current_usuario.try(:perfiles).find_by_Descripcion(params[:Module_name]).try(:Listar)
if @can_accede != true
redirect_to root_path, alert: "you don't have permission."
this is my before_action:
before_action :can_accede, only: [:index]
it is possible to send to the action can_accede through the before_action a
parameter param [: Module_name]?