Home>

Error resolution

NoMethodError in SkilsController # create

Error message


undefined method `permit'for: skil: Symbol

Corresponding source code

new.html.erb ]

<% = form_for @skil do | f |%>
  
  
  <% = f.label: title%><br>
 <% = f.text_field: title, style:'width: 30%;'%><br>
 <% = f.label: body%><br>
 <% = f.text_field: body,: size =>140%>
  
  
  <% = f.submit "button_value"%>
  
    
  <% = f.label: body,'evaluation', class:'col-md-3 col-form-label'%>
  <% = f.hidden_field: body, id:: review_star%>
  
<!-Evaluation javascript->
<script>
  $('#star'). raty ({
    size: 36,
    starOff:'<% = asset_path ('star-off.png')%>',
    starOn:'<% = asset_path ('star-on.png')%>',
    scoreName:'comment [star]',
    half: false,
  });
</script>
<% end%>
Source code

`` ``` Code controller //

 @ skil = Skil.new
 end
 def create
    @skil = Skil.new (skils_params)
    @ skil.save
    redirect_to skil_path (@skil)
 end

 def skils_params
   params.require (: skil) .permit (: title,: body)
  end
end
code
What I tried

I tried to change the permit part, but it didn't change.
undefined method `permit'for: skil: Symbol
Please tell us about symbols as well.

Supplementary information (FW/tool version, etc.)

Please provide more detailed information here.