actually you are right. my intention was to get the object with the smallest sequence number, not return the sequence number itself. The ruby documentation says this: "Returns the object in enum with the minimum value. " for min. Hence, I thought it would return the object.
> I suspect the error is actually being raised on the next line where > you do > > available_book.sequence > 100 > > since you've set available_book > to available_books.flatten.map(&:sequence).min, ie available_book is > the smallest sequence number > > Fred > > > > > > > > > thanks for response -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.