This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if params[:query].present? | |
| # not doing :* prefix matching right now. | |
| # Preprocess the string into what TSvector wants. spaces -> ? | |
| # Then only letters, numbers, underscores and qmarks are left. | |
| query = params[:query].gsub(/\s+/, '?').gsub(/[^\w\?]/, '') | |
| @results = @results.select { [ts_headline('english', :text, to_tsquery('english', query), 'MaxFragments=2').as(headline), id, title, happened_at]} | |
| @results = @results.filter("ts_text @@ to_tsquery('english', ?::text)", query) | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| st = status | |
| co = checkout | |
| lg = log --graph --oneline --all --decorate | |
| gap = add --patch --interactive |
NewerOlder