Frederick Cheung wrote in post #1035593:
> Stick your conditions in a call to where() and your select clause in
> a call to select()
The problem, is that in select() can't be params:
I need: "SELECT id, word, MATCH (word) AGAINST (?) AS score" and this
doesn't work
@words = Word.select("id, word, MATCH (word) AGAINST (?) AS
Score",params[:search]).where(...)
It's should be something like this, but this doesn't work :(
@words = Word.select("id, word, MATCH (word) AGAINST (?) AS
Score",params[:search]).where("MATCH (word) AGAINST
(?)",params[:search]).order("word!=(?), language",
params[:search]).page(params[:page]).per(5)
Any idea, how make it work?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.