I am creating an application that tracks customers with quotes. Customer has many quotes and one belongs to one customer. I am trying to use a method that combines a first name and last name fields to produce a full name. My code is as follows.
Customer Model:
class Customer < ActiveRecord::Base
has_many :quotes
def full_name
"#{FName} #{LName}"
end
end
Quotes form.html.erb
<div class="field">
<%= f.label :Customer_Name %><br>
<%= collection_select :Quote, :Customer_id, Customer.all, :id, :full_name, {}, {:multiple => true} %>
</div>
When I try to create a new record, I am given an "uninitialized constant Customer::FName" error. Could someone please advise?