Hello,
In my controller I'd like to do something like the following:
@book = Book.find(:all, :conditions = > [" created_at > with in the last 1 minute "]
if @book.nil?
# Just incase we didn't create a book, we'll initialize one
@book = Book.create()
end
@chapters = @book.chapters.build etc.............
* In sum, when the user is uploading a chapter, if they've recently created a book, I want the chapter to automatically go to that book and to make a new book.
Thoughts? thank you all