veronicacannon / stylist

Rails App for Alycia the Stylist
4 stars 2 forks source link

No services #25

Closed leezl closed 10 years ago

leezl commented 10 years ago

No services are listed in the appointment creation form. When an appointment is created without a service, it leads to the admin pages crashing, because they try to access the missing service, and it is NIL:

undefined method `service_description' for nil:NilClass

27:     <td><%= appointment.phone %></td>
28:     <td><%= appointment.email %></td>
29:     <td><%= appointment.appot %></td>
30:     <td><%= appointment.service.service_description %></td>
31:     <td><%= appointment.message %></td>
32:     <td>
33:         <%= link_to 'Show', appointment %>

Suggestions:

veronicacannon commented 10 years ago

Let's add at least one service to the SEED (when we add the admin user) to resolve this issue.