From: Giles Bowkett Date: 2006-11-01T14:31:27+09:00 Subject: Re: still more relentless non-repetition wow that's handy: thing.constantize.find_by_contents(term) boom! done. On 10/31/06, Wilson Bilkovich wrote: > On 10/31/06, Giles Bowkett wrote: > > > model = self.class.const_get t.capitalize > > > model.find_by_contents t > > > > **that** looks like the way to do it. > > > > gracias! > > > > ActiveSupport has a helper for this already. > > model = t.constantize > model.find_by_contents(t) > > -- Giles Bowkett http://www.gilesgoatboy.org