John Merlino
2012-Aug-12 16:59 UTC
invoking an activerecord relation method on the result of a calculation method, which returns a FixNum type
I was seeing these examples in a book: Person.minimum(:age).where(''last_name <> ?'', ''Drake'') Person.minimum(:age).having(''min(age) > 17'').group(:last_name) The thing is minimum is returning a FixNum. When invoking the relation methods (e.g. where, having) on a fixnum will raise an exception: undefined method `where'' for 1:Fixnum So am I missing something here? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.