Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast name search by default #5

Merged
merged 1 commit into from
Oct 27, 2020
Merged

fast name search by default #5

merged 1 commit into from
Oct 27, 2020

Conversation

andrew
Copy link
Contributor

@andrew andrew commented Oct 26, 2020

@andrew andrew merged commit b5ca346 into master Oct 27, 2020
Comment on lines +11 to +20
if params[:name].present?
case params[:match]
when 'iexact'
@scope = @scope.where('name ilike ?', params[:name])
when 'partial'
@scope = @scope.where('name like ?', "%#{params[:name]}%")
when 'ipartial'
@scope = @scope.where('name ilike ?', "%#{params[:name]}%")
else
@scope = @scope.where(name: params[:name])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @obo20 – I imagine you will do something similar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants