Add times options in excerpt #7098

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@GCorbel
Contributor
GCorbel commented Jul 19, 2012

Add possibility to match multiple times a word with excerpt function

@GCorbel GCorbel Add times options in excerpt
Add possibility to match multiple times a word with excerpt function
3304e92
@rafaelfranca
Member

I think this is a very specific case that should not belongs to Rails, but to a gem, or to your project. But I'll ask for more feedback.

cc/ @josevalim @carlosantoniodasilva

@carlosantoniodasilva

I have to agree with @rafaelfranca, it adds a lot of complexity to the method for something that seems very application specific. Do you have a particular use case for that? Thanks!

@GCorbel
Contributor
GCorbel commented Jul 19, 2012

You're maybe right. My goal was to copy the google's behaviour. For example, when I search for "test rails bla" I have this result :

Every model MyModel in Rails has a corresponding unit test case in the class ... ruby: header: Introductory article on Ruby body: bla bla bla user: joe # Article ...

I must to continue my work, to split the phrase, but I thought to do 2 pull requests.

@rafaelfranca
Member

Seems a legitimate use case but I don't think we should add more complexity to this method since this use case will not be often used.

But this can be very useful as a gem.

Anyway, thank you so much for your contribution and time. I'll leave this open from now because someone can think that this is useful and should be merged in.

@GCorbel
Contributor
GCorbel commented Jul 19, 2012

Do you think I should continue my work and do another pull request in order to have a google's clone?

@rafaelfranca
Member

Lets wait form more feedback.

cc/ @jeremy @fxn

@steveklabnik
Member

It's been 4 months, I guess nobody thinks it's useful enough to merge. Please make this a gem, @GCorbel .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment