How do I generate a page from a controller from inside a model

I have a model that I want to use for generating web pages. The pages
will be what is rendered by a controller action. The generated pages
will be FTP'ed to a hosting site where they will served up as static

One approach is to do it like ActionController::TestCase:

class Page

  belongs_to :book

  def contents
      controller =
      request =
      response =

      request.path = "/books/#{}" # show action
      controller.process(request, response)

Then call page.contents will cause the action to
be called which renders a page. The rendered page then would be

Is this the best way to do this?