Partial View Ruby on Rails
===

I have 3 models

customer
book_manager, and
book

The customer can edit is own setting like a profile account. However it render different model such has book. To do this i decided to render the file book/form has follow <% render book/form.html.erb %>

When the profile page loads up, the customer may view in the book sections either nothing if nothing has been written before or something if he already wrote something before. In the customer controller page i have the following code to fetch the information
    def edit
      @book = current_customer.books.order("created_at DESC").limit(1)
    end

In the books/_form.html.erb I have then the following

    <%= form_for(@book) do |f| %>
      <% if @book.errors.any? %>
        <div id="error_explanation">
          <h2><%= pluralize(@book.errors.count, "error") %> prohibited this book from being saved:</h2>
    
          <ul>
          <% @book.errors.full_messages.each do |msg| %>
            <li><%= msg %></li>
          <% end %>
          </ul>
        </div>
      <% end %>
      <div class="field">
        <%= f.label :description %><br />
        <%= f.text_field :description %>
      </div>
      <div class="actions">
        <%= f.submit %>
      </div>
    <% end %>

In book controller edit, i have nothing or where should i place my command @book so they can speak?

I have the following error

    NoMethodError in Customers#edit
    
    Showing /home/jean/rail/map/app/views/books/_form.html.erb where line #1 raised:
    
    undefined method `model_name' for ActiveRecord::Relation:Class
    Extracted source (around line #1):
    
    1: <%= form_for(@book) do |f| %>
    2:   <% if @book.errors.any? %>
    3:     <div id="error_explanation">
    4:       <h2><%= pluralize(@book.errors.count, "error") %> prohibited this book from being saved:</h2>