We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is is possible to add Custom Operators or Options to every search in the entire project?
For example
# config/initializers/search_cop.rb SearchCop.defaults do generator :like_string do |column_name, raw_value| pattern = quote("%#{raw_value}%") "#{column_name} LIKE #{pattern}" end options :all, :type => :fulltext, default: true end
Since its probably 2 seperate works to add generators and options. Its of a much higher importance to add this functionality for the generators
generators
options
The text was updated successfully, but these errors were encountered:
it's not possible like you specified it. But i think something like the following can be used to achieve something similar:
def with_search_defaults(scope) scope.generator ... end search_scope :search do with_search_defaults(self) ... end
or even
module SearchGenerators def self.extended(scope) scope.generator ... end end search_scope :search do extend SearchGenerators end
Sorry, something went wrong.
No branches or pull requests
Is is possible to add Custom Operators or Options to every search in the entire project?
For example
Since its probably 2 seperate works to add
generators
andoptions
. Its of a much higher importance to add this functionality for thegenerators
The text was updated successfully, but these errors were encountered: