ActionController::ParameterMissing (param is missing or the value is empty:)
<p>I studied the rails tutorial by Michael Hartl and I'd like to add new service to this app.</p>

<p>Although I created new model, controller and views, the following error appeared when I submit <code>f.submit "Create my schedule"</code> in <code>_schedule_form.html.erb</code>.</p>

<p>This error may be caused by strong parameter, I guess.</p>

<p>It would be appreciated if you could give me any suggestion.</p>

<p><b>development.log</b></p>

<pre><code>ActionController::ParameterMissing (param is missing or the value is empty: schedule):
  app/controllers/schedules_controller.rb:30:in `schedule_params'
  app/controllers/schedules_controller.rb:9:in `create'
</code></pre>

<p><b>schedule_controller.rb</b></p>

<pre><code>class SchedulesController &lt; ApplicationController
  before_action :logged_in_user, only: [:create, :destroy]

  def new
    @schedule = Schedule.new
  end

  def create
    @schedule = current_user.schedules.build(schedule_params)
    if @schedule.save
      flash[:success] = "schedule created!"
      redirect_to root_url
    else
      render 'new'
    end
  end

...

  private

    def schedule_params
      params.require(:schedule).permit(:title)
    end

end
</code></pre>

<p><b>views\schedules\new.html.erb</b></p>

<pre><code>&lt;div class="row"&gt;
  &lt;div class="col-md-12"&gt;
    &lt;p&gt;Create schedule (&lt;%= current_user.name %&gt;)&lt;/p&gt;
    &lt;%= render "schedule_form" %&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><b>views\schedules\ _schedule_form.html.erb</b></p>

<pre><code>&lt;%= form_for(@schedule) do |f| %&gt;
  &lt;%= render 'shared/error_messages', object: f.object %&gt;
  &lt;div class="input-group"&gt;
    &lt;span class="input-group-addon"&gt;Title&lt;/span&gt;
    &lt;input type="text" class="form-control"&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;%= f.submit "Create my schedule", class: "btn btn-primary" %&gt;
  &lt;br&gt;
&lt;% end %&gt;
</code></pre>