Comments (10)
thanks for checking. v1.2.3 released
from search_cop.
Thanks for the report! Could you also share the respective search scope specification? Thx
from search_cop.
Here's it:
search_scope :search do
attributes :created_at, :completed, :due_date, :flagged, :category, :body
end
search_scope :search_user do
attributes :created_at, :completed, :due_date, :flagged, :category, :body
attributes user: 'user.name'
end
search_scope :search_assignee do
attributes :created_at, :completed, :due_date, :flagged, :category, :body
attributes assignees: ['assignees.name']
end
search_scope :search_by_step do
attributes :current_step_body
end
Thanks for you quick response by the way.
EDITED:
I will take a look again to see exactly which of the scopes is/are causing the issue, and get back to you, if that would help.
from search_cop.
Reproduction added. Will fix it asap.
from search_cop.
maybe you could quickly validate that
gem "search_cop", git: "https://github.com/mrkamel/search_cop", branch: "fix-model-namespace"
is working for you before i release it
from search_cop.
v1.2.2 released which should fix it. Re-open otherwise.
from search_cop.
Sorry for my late response. It's not fixed yet. I get this error now:
rails_1 | uninitialized constant Note
rails_1 | Did you mean? Notes
rails_1 | /usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/inflector/methods.rb:274:in `const_get'
rails_1 | /usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/inflector/methods.rb:274:in `constantize'
rails_1 | /usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar/attributes.rb:81:in `klass_for'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar/attributes.rb:92:in `attribute_for'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar/attributes.rb:62:in `block in attributes'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar/attributes.rb:62:in `collect'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar/attributes.rb:62:in `attributes'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar/attributes.rb:54:in `compatible?'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:90:in `block in evaluate'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:90:in `select'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:90:in `evaluate'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:112:in `evaluate'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:17:in `collect'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:17:in `evaluate'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:119:in `evaluate'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:17:in `collect'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop_grammar.rb:17:in `evaluate'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop/grammar_parser.rb:18:in `parse'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop.rb:28:in `parse'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop/query_builder.rb:9:in `initialize'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop.rb:64:in `new'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop.rb:64:in `unsafe_search_cop'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop.rb:56:in `search_cop'
rails_1 | /usr/local/bundle/bundler/gems/search_cop-55ff5aea76cc/lib/search_cop.rb:47:in `block in search_scope'
rails_1 | /usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/relation/delegation.rb:108:in `public_send'
rails_1 | /usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/relation/delegation.rb:108:in `block in method_missing'
rails_1 | /usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/relation.rb:406:in `block in scoping'
rails_1 | /usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/relation.rb:804:in `_scoping'
rails_1 | /usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/relation.rb:406:in `scoping'
rails_1 | /usr/local/bundle/gems/activerecord-6.1.4.7/lib/active_record/relation/delegation.rb:108:in `method_missing'
from search_cop.
ok, thanks, i was able to reproduce it and pushed a fix. Could you please verify via
gem "search_cop", git: "https://github.com/mrkamel/search_cop", branch: "fix-inherited-and-namespaced-models"
thanks.
from search_cop.
Ok, give me a few minutes.
from search_cop.
It's fixed now
from search_cop.
Related Issues (20)
- globalize with search_cop - unknown attribute HOT 2
- Ignoring MySQL stop words for full-text search HOT 5
- Support for PostgreSQL ENUM HOT 3
- Matching multiple in a has_many HOT 1
- multiple where conditions and concatenated with AND HOT 3
- Attribute (case insensitive / ILIKE) HOT 3
- generator for attribute options HOT 3
- Error when using with non-standard pluralization in class name HOT 2
- DEPRECATION WARNING HOT 2
- How to handle special search logic / virtual attributes HOT 4
- Suggestion: Option for `exact: true` (or `right_wildcard: false`) HOT 1
- Can search_cop work with Postgres hstore? HOT 8
- Suggestion: Add support for sort in the free text search HOT 4
- Searching for empty or non empty with the free text expression HOT 2
- RAILS 6 - Search in ActionText HOT 3
- Search word that include % does not work correctly HOT 2
- Ability to apply Custom Operators or Options to entire project HOT 1
- README error? HOT 6
- Words containing brackets HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from search_cop.