Add getQuery function in Edit / Actions / Show controllers