I have params[:tab] within my activities controller. This is used to switch between different tabs on a view. I want to be able to access this param within my model method self.search_my_work.
Activities controller
if params[:tab].blank? || params[:tab] == 'active' || params[:tab] == 'inactive' || params[:tab] == 'overdue'
Activities model
if tab == 'overdue'
do this
else
do this
end
As it stands right now I get a Name error. I am aware it needs instantiated but I don't know how.