Is it possible to have error handling or error tolerances inside of a
ruby controller?

So when my lucene java server has a hiccup and causes my Acts_As_solr
search to quit working, i can use good old fashioned .find. For example:


@phrase = Phrase.find_by_solr("search_term")

if error
    @phrase = Phrase.find(:first, :conditions => {"search_term"})
end




Ruby 1.8.6, Rails 2.1.0, OSX
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to