Created
July 3, 2016 06:56
-
-
Save ananyo2012/ea7e4b801d847857d833f3371740cb63 to your computer and use it in GitHub Desktop.
Ruby code for simple Search query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@notes = DrupalNode.where( | |
'type = "note" AND node.status = 1 AND title LIKE ?', | |
"%" + params[:id] + "%" | |
) | |
.joins(:drupal_tag) | |
.where('term_data.name LIKE ?', 'question:%') | |
.order('node.nid DESC') | |
.page(params[:page]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment