Skip to content
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

fix a functional test concerning node model (#2716) #2717

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/models/node.rb
Expand Up @@ -43,9 +43,7 @@ def self.search(query, order = :default)
.order(orderParam)
end
else
nodes = Node.limit(limit)
.where('title LIKE ?', '%' + input + '%', status: 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, but we do need this extra title matching -- otherwise we won't match the title against search input. This is just backup code if MySQL/MariaDB are not installed, but I still want to be sure it works.

I think the issue here is we never defined the limit parameter! Not sure how that happened, but if you re-add the original code but remove the .limit(limit) we should be OK here. Thanks so much for looking into this!!!

.order(orderParam)
nodes = Node.where(status: 1).order(orderParam)
end
end

Expand Down