Felix Schäfer wrote: > Hello, > > I've been looking for a way to noop a find_all_by. [...] > Does anyone know a way to make this less painfull?
Hackish, but... if client_id.nil? finder = :or else finder = :find_all_by_client_id end Host.last_seen_before.send(finder, client_id) > > Thanks, > > Felix Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- 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 -~----------~----~----~----~------~----~------~--~---

