Assuming you posted the create action for the SchedulesController
there is no need for:
@schedule = Schedule.find(params[:id])
this will probably return nil, because there is no schedule (after all that is what you want to create
here).
@schedule = Schedule.new(schedule_params)
if you want to assign a project to the schedule, you need to submit this information so you can access it in the params
hash. Something like:
@schedule.project = Project.find(params[:project_id])