Skip to content

Commit

Permalink
Allow to override excerpt words
Browse files Browse the repository at this point in the history
In thinking-sphinx 2 one could easily override the excerpt words like that:

```
excerpt_options => {:words => "mywords"}
```

Would be nice if that was supported in thinking-sphinx 3 too:

```
excerpts => {:words => "mywords"}
```
  • Loading branch information
groe committed Jul 5, 2013
1 parent 1dddfc3 commit 8b20ffe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/thinking_sphinx/panes/excerpts_pane.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class ThinkingSphinx::Panes::ExcerptsPane
def initialize(context, object, raw)
@context, @object = context, object
@excerpt_words = @context.search.options[:excerpts].delete(:words) if @context.search.options[:excerpts]
end

def excerpts
Expand Down

0 comments on commit 8b20ffe

Please sign in to comment.