On Jun 28, 6:10 pm, John Merlino <stoici...@aol.com> 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment