Skip to content

Commit

Permalink
Sort filtered keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Volodymyr Sveredyuk committed Oct 30, 2017
1 parent ac6d752 commit e9d8b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid_search/mongoid_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ def index_keywords!

def set_keywords
self._keywords = Mongoid::Search::Util.keywords(self, self.search_fields).
flatten.reject{|k| k.nil? || k.empty?}.uniq.sort
flatten.reject{|k| k.nil? || k.empty?}.uniq.sort.push(*self.search_fields.map(&:to_s))
end
end

0 comments on commit e9d8b30

Please sign in to comment.