At this time I need to use three variables in three different methods with the respective file in the view, but I don't want to define each variable in each method.
How can I define the variable just once and have access to the variables from all the three methods?
Those are the methods:
def pendientes
end
def proceso
end
def finalizadas
end
Those are the three variables:
@pendientes = Support.where("estado = ?", 1)
@procesos = Support.where("estado = ?", 2)
@finalizadas = Support.where("estado = ?", 3)
How do I need to define the variables to do it?