I’ve got three views called users, tasks and userTasks. In userTasks admin/manage view it shows user_id and tasks_id by default but I’ve added a new field called userName. It shows all the usernames but the search doesn’t work.
I’ve added this field into the search functions in the model but nothing happens.
Show us more details, how you define your views and how you build criteria for searching. You probably need to enable eager loading instead of lazy loading.
In my model I added the new field into the rules function as safe on search. I’ve added it into the attributeLabels() function.
Now I have to add something into the search() function but I don’t really know what to add and how to add it. I tried the code that Maggie Q(Ankit Modi) shared but isn’t working.
EDIT: nevermind, it’s working now with these three lines: