-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for cyrillic search #873
Conversation
lib/administrate/search.rb
Outdated
@@ -30,7 +30,7 @@ def query | |||
end | |||
|
|||
def search_terms | |||
["%#{term.downcase}%"] * search_attributes.count | |||
["%#{term.mb_chars.downcase.to_s}%"] * search_attributes.count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant use of Object#to_s in interpolation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this and yes, you shouldn't need #to_s
since you're interpolating and the return value of String#downcase
is a string.
Hi @dminchev! I think this is good to merge, if you'd be able to address Hound's comments? |
Hi @nickcharlton, thanks for the feedback! I'll update it and let you know. |
@nickcharlton I've updated the redundant usage and the tests are passing successfully local. However on circleci there is failure which I think is not related to the changes. I'm not able to rerun the circleci build. Can you please check it? |
Oh, that's interesting. We'd thought that #872 had fixed this. What if you rebase your branch on top of current master? Hopefully it should go away. |
@@ -1,4 +1,7 @@ | |||
#{$all-buttons}, | |||
button, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid qualifying attribute selectors with an element.
I've updated my master branch with the upstream master branch however there is one new violation found by hound. |
Oh, it looks like you've picked up a bunch of previous commits. This sometimes happens if the history is slightly older and git can't tell. I'd expect to see just your "Add support for cyrillic search", "Fix redundant use of Object#to_s in interpolation." commits. Would you mind rebasing again? |
All should be ok now |
Perfect! Thanks. Merging. |
Great, thanks! |
This update adds support for cyrillic and other language search and doesn't change the original search behaviour.