0
コードを実行しようとするとこのエラーが発生します。私が調査したものから、私の問題があるのいずれかの私のコントローラや私の見解では未定義メソッド `each 'for nil:注文メソッドのNilClass
これはこれは私が
を%h1 React Calendar %h2 Appointments %h3 Make a new appointment = form_for @appointment do |f| = f.text_field :title = f.text_field :appt_time = f.submit 'Make appointment' = @appointmets.each do |a| %h3 = a.title %p = a.appt_time
実行している私の見解である私のコントローラ
class AppointmentsController < ApplicationController def index @appointments = Appointment.order('appt_time ASC') @appointment = Appointment.new end end
です
Rails 5.1.3 Ruby 2.4.1