Forum: Ruby on Rails RE: Help with TextSearch :all and MySQL

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D105b980e30e1b77fc761b1cd1b2de32?d=identicon&s=25 unknown (Guest)
on 2006-01-06 20:12
(Received via mailing list)
Duane,

When I comment-out the 'validate_options' lines in self.search, it
works.

I'm relieved! :)

The 'validate_options' should still be fixed. But at least it works with
'searches_on :all' or without it.

After the 'validate_options' problem is solved, it would be good to
please update the 'search.rb' code on the Rails wiki:

  http://wiki.rubyonrails.com/rails/pages/TextSearch

Thank you very much for your help!

  Matt


Wagner, Matt C. wrote:
>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/bas
e.rb:991:in
>  `method_missing' #{RAILS_ROOT}/lib/search.rb:50:in `search'
>  #{RAILS_ROOT}/app/controllers/foobar_controller.rb:58:in `search'
> ----------------------
>
> The error is the same with or without 'searches_on :all' in the model
> file.
>
> Where do you have 'validate_options' defined?

--
Matt C. Wagner
Information Security Analyst

Network Intrusion Detection
Security Operations Center
Corporate Information Security
Wells Fargo Bank
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-01-06 23:19
(Received via mailing list)
On Jan 6, 2006, at 12:09 PM, <Matt.C.Wagner@wellsfargo.com>
<Matt.C.Wagner@wellsfargo.com> wrote:

>
> Wagner, Matt C. wrote:
>>
>> Where do you have 'validate_options' defined?
Hi Matt,

Thanks for your patience with this.  I'm working from an older code
base (Rails 0.13) and so there are some differences I didn't expect.

It turns out that validate_options is now part of the Hash class:
http://dev.rubyonrails.org/changeset/2167

So you should be able to replace that call with
options.assert_valid_keys(:keys, :go, :here)

I'll update the wiki.  Thanks!

Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
This topic is locked and can not be replied to.