-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate SearchBuilder into the host application #1152
Conversation
@@ -1,140 +1,6 @@ | |||
module Blacklight | |||
class SearchBuilder | |||
extend Deprecation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand why this can't be a class, and have ::SearchBuilder
extend it if it needs to.. especially because the behavior defines #initialize
, which screams class
to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be fine with me. I can rework it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
This gives plugins a place to add additional search methods without having an complex inheritance hierarchy.
0e697c4
to
d870405
Compare
def locate_search_builder_class | ||
::SearchBuilder | ||
rescue NameError | ||
Deprecation.warn(Configuration, "Your application is missing the SearchBuilder. Have you run `rails generate blacklight:search_builder`? Falling back to Blacklight::Solr::SearchBuilder") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to deprecation Blacklight::Solr::SearchBuilder
? It seems like it works fine as-is for common uses..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm for removing as much code as possible, so I think that deprecating it is the thing to do.
Generate SearchBuilder into the host application
This gives plugins a place to add additional search methods without
having an complex inheritance hierarchy.