What to do with error 'Please review the problems below:' using cocoon gem?
<p>I am creating an ruby on rails 5 application. It is a todolist kind of application and using simple_form, haml-rails and cocoon gem. This is a application with nested form.</p>

<ol>
<li><p>Generated a scaffold for goal and created model for action
Goal.rb and Action.rb</p>

<blockquote>
<pre><code>class Goal &lt; ApplicationRecord
  has_many :actions
  accepts_nested_attributes_for :actions, reject_if: :all_blank
end

class Action &lt; ApplicationRecord
  belongs_to :goal
end
</code></pre>
</blockquote>

<ol start="2">
<li>Then added the actions_attribute to permit in the params </li>
</ol></li>
</ol>

<blockquote>
<pre><code>class GoalsController &lt; ApplicationController   before_action :set_goal, only: [:show, :edit, :update, :destroy]   def index
    @goals = Goal.all   end   def show   end   def new
    @goal = Goal.new   end   def edit   end   def create
    @goal = Goal.new(goal_params)
    respond_to do |format|
      if @goal.save
        format.html { redirect_to @goal, notice: 'Goal was successfully created.' }
        format.json { render :show, status: :created, location: @goal }
      else
        format.html { render :new }
        format.json { render json: @goal.errors, status: :unprocessable_entity }
      end
    end   end   def update
    respond_to do |format|
      if @goal.update(goal_params)
        format.html { redirect_to @goal, notice: 'Goal was successfully updated.' }
        format.json { render :show, status: :ok, location: @goal }
      else
        format.html { render :edit }
        format.json { render json: @goal.errors, status: :unprocessable_entity }
      end
    end   end   def destroy
    @goal.destroy
    respond_to do |format|
      format.html { redirect_to goals_url, notice: 'Goal was successfully destroyed.' }
      format.json { head :no_content }
    end   end   private
    def set_goal
      @goal = Goal.find(params[:id])
    end
    def goal_params
      params.require(:goal).permit(:name, :purpose, :deadline, actions_attributes: [:step])
    end
</code></pre>
  
  <p>end</p>
</blockquote>

<ol start="3">
<li>Forms for both form.html and action.html</li>
</ol>

<p><strong>_form.html.haml</strong></p>

<blockquote>
<pre><code>= simple_form_for(@goal) do |f|
  = f.error_notification

  .form-inputs
    = f.input :name
    = f.input :purpose
    = f.input :deadline
    %h3 Actions
    #tasks
      = f.simple_fields_for :actions do |action|
        = render 'action_fields', f: action
      .links
        = link_to_add_association 'Add', f, :actions

  .form-actions
    = f.button :submit
</code></pre>
  
  <p>// action.html.haml<br>
      .nested-fields
        = f.input :step
        = f.input :done, as: :boolean
        = link_to_remove_association "remove task", f</p>
</blockquote>

<p>log in the console when i submit form</p>

<pre><code>Processing by GoalsController#create as HTML
  Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"jel0g+oCkNaspe7T9dz7suDczIOdoKJqPqPDK9ta0WLPbwaSPBwshrDD2BrNAFeLoDx+0/soe11MWaZaH8cQoA==", "goal"=&gt;{"name"=&gt;"ja", "purpose"=&gt;"asdfd", "deadline"=&gt;"asdfasd", "actions_attributes"=&gt;{"0"=&gt;{"step"=&gt;"ARasd", "done"=&gt;"1", "_destroy"=&gt;"false"}, "1475080334356"=&gt;{"step"=&gt;"", "done"=&gt;"0", "_destroy"=&gt;"false"}}}, "commit"=&gt;"Create Goal"}
Unpermitted parameter: _destroy
Unpermitted parameter: _destroy
   (0.5ms)  BEGIN
   (0.5ms)  ROLLBACK
  Rendering goals/new.html.haml within layouts/application
  Rendered goals/_action_fields.html.haml (18.5ms)
  Rendered goals/_action_fields.html.haml (26.5ms)
  Rendered goals/_action_fields.html.haml (19.0ms)
  Rendered goals/_form.html.haml (252.5ms)
  Rendered goals/new.html.haml within layouts/application (309.0ms)
Completed 200 OK in 932ms (Views: 898.5ms | ActiveRecord: 1.0ms)
</code></pre>

<p><img src="https://i.stack.imgur.com/MLbtT.png" alt="enter image description here"></p>