This area should use the existing searches_many reflection, rather than duplicating the logic. You can determine if the requested association even exists, and possibly acquire the scoping without copying/pasting.