Rails 4 simple_form has_many through check boxes not saving

后端 未结 1 738
野性不改
野性不改 2021-02-06 08:05

I am trying to implement an employee recurrent deductions table through check boxes using simple_form. My code works but the selected recurrent deductions are not saved in my ta

相关标签:
1条回答
  • 2021-02-06 08:24

    I needed the following strong params

    def employee_params
      params.require(:employee).permit(:first_name, :recurrent_ids => [])
    end
    
    0 讨论(0)
提交回复
热议问题