[Rails] Re: SQL search

2009-02-27 Thread Rob Biedenharn
On Feb 27, 2009, at 11:29 AM, Ga Ga wrote: How I write it in rails format? Articles.find( ) SELECT *, MATCH(title, body) AGAINST('$keyword') AS score FROM articles WHERE MATCH(title, body) AGAINST('$keyword') ORDER BY score DESC Obviously, you'd have to try it yourself, but:

[Rails] Re: SQL search

2009-02-27 Thread Ga Ga
I get: undefined method `sanitize_sql' -- 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

[Rails] Re: SQL search

2009-02-27 Thread Ga Ga
Ga Ga wrote: I get: undefined method `sanitize_sql' Help ? -- 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

[Rails] Re: SQL search

2009-02-27 Thread Rob Biedenharn
On Feb 27, 2009, at 11:42 AM, Rob Biedenharn wrote: On Feb 27, 2009, at 11:29 AM, Ga Ga wrote: How I write it in rails format? Articles.find( ) SELECT *, MATCH(title, body) AGAINST('$keyword') AS score FROM articles WHERE MATCH(title, body) AGAINST('$keyword') ORDER BY score DESC

[Rails] Re: SQL search

2009-02-27 Thread Ga Ga
Rob Biedenharn wrote: On Feb 27, 2009, at 11:42 AM, Rob Biedenharn wrote: match_part = self.class. Rob Biedenharnhttp://agileconsultingllc.com r...@agileconsultingllc.com Sorry, if you look at the docs, sanitize_sql is a protected class method of ActiveRecord::Base Is there

[Rails] Re: SQL search

2009-02-27 Thread Rob Biedenharn
On Feb 27, 2009, at 2:56 PM, Ga Ga wrote: Rob Biedenharn wrote: On Feb 27, 2009, at 11:42 AM, Rob Biedenharn wrote: match_part = self.class. Rob Biedenharnhttp://agileconsultingllc.com r...@agileconsultingllc.com Sorry, if you look at the docs, sanitize_sql is a protected class