On Jun 28, 6:10 pm, John Merlino <[email protected]> wrote:

> This line right here:
>
> available_books.flatten.map(&:sequence).min
>
> produces the above error. It's this part "map(&:sequence).min" that is
> causing it. Basically I am flattening the array of subbooks and then
> searching the one which has the lowest value for the sequence
> attribute, corresponding to a sequence field in the subbooks table.
>

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 [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