On 28 June 2011 18:10, John Merlino wrote:
> available_books = books.each.map do |book|
> book.subbooks.where(:book_state_id =>
> BookState[:available_for_assignment].id)
> end
>
> available_books.flatten.map(&:sequence).min
>
> "undefined method sequence for 1:Fixnum"
>
> produces the
Hi all,
What I am trying to do:
1) Search for books at a specific school
2) Iterate through each book and find all its related subbooks where
the book state is of a specific type
3) Return an array of those subbooks for each book
4) Since the array will have subarrays of the subbooks, flatten the
2 matches
Mail list logo