Nick Ostrovsky

Results 85 comments of Nick Ostrovsky

Yes please, it would be great to be able to use it from bower. With minor version bumps.

Sorry, maybe I described the issue incorrectly: Haystack: "Artyom Makarov", "Nick", "Karl" Needle: "art" always returns "Karl" instead of Artyom

I would suggest something like :match_words but that might be misleading though, what about :begin_with_match or :match_from_beginning? Algoritm selection is another good suggestion but it's a bit hard to apply,...

In my imaginary world it would greatly increase the weight if needle matches the characters from the beginning of the string or right after the white space. "like" should prefer...

Splitting user names to first and last name and matching separately. So instead of ["Artyom Makarov", "Karl", "Nick"] it searches ["Artyom Makarov", "Karl", "Nick", "Artyom", "Makarov"]. In that case "art"...

Another solution might be "match all letters" option. **Artyom** contains all the letters from **art** and yet it returns Karl instead.

Hi, you mean you're storing the whole user object? I think it would be ok to store just the ID.

Just checked it, `session[:original_user]` is always `nil`

Added `session[:original_user_scope_identifier].inspect` to application layout. It's always `nil` as well.

Hmm I think yes, here is an excerpt from my `initializers/switch_user.rb`: ``` config.switch_back = true config.controller_guard = ->(current_user, request, original_user) do current_user && current_user.can_supervise? || original_user && original_user.can_supervise? end ```