title: NameError: uninitialized constant when calling form_for
body: <p>-My routes.rb</p>
  
  <p>-resources :manufacturers do
   - resources :vehicle_data
  -end</p>
  
  <p>-In controller</p>
  
  <ul>
  <li>def create</li>
  <li>@manufacturer = Manufacturer.find(params[:manufacturer_id])</li>
  <li>@vehicle_data = @manufacturer.vehicle_data.create(params[:vehicle_data])</li>
  <li>@vehicle_data.save
  -end</li>
  </ul>
  
  <p>-In Views</p>
  
  <p>-&lt;%= form_for([@manufacturer, @manufacturer.vehicle_data.build]) do |f| %></p>
  
  <p>-When trying to create new record</p>
  
  <p>-NameError in Vehicle_data#index</p>
  
  <p>-Showing C:/Users.../app/views/vehicle_data/index.html.erb where line #12 raised:</p>
  
  <p>-uninitialized constant Manufacturer::<strong>VehicleDatum</strong>
  -Extracted source (around line #12):</p>
  
  <p>-9: 
  -10: 
  -11: 
  -12: &lt;%= form_for([@manufacturer, @manufacturer.vehicle_data.build]) do |f| %>
  -13:<br>
  -14:   <p></p>
  
  <p>How do I make this form work??? Why the model name is changed from VehicleData to VehicleDatum</p>