Update: Allow search for users by first name AND last name
For the user search form of a social media platform, built with Rails. The user table had first_name and last_name columns and the existing search allows users to search by first or last name.
To allow a search by full name without changing the table, I added a custom Ransacker method to the existing user model.
For the user search form of a social media platform, built with Rails. The user table had first_name and last_name columns and the existing search allows users to search by first or last name.
To allow a search by full name without changing the table, I added a custom Ransacker method to the existing user model.