Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ok, so I actually did not need to nest the parameters. This is what ended up working for me:</p> <pre><code># Never trust parameters from the scary internet, only allow the white list through. def checkout_params params.require(:checkout).permit(:job, :shift, :employee_ids, :date, :hours, :sales, :tips, :owed, :collected, :notes) end </code></pre> <p>Here is the combination of changes that worked.</p> <ul> <li>db/schema.rb - <a href="https://gist.github.com/leemcalilly/32c792277de335aa54b8" rel="nofollow">https://gist.github.com/leemcalilly/32c792277de335aa54b8</a></li> <li>controllers/checkouts_controller.rb - <a href="https://gist.github.com/leemcalilly/6e01ff8b86b1bdd078ed" rel="nofollow">https://gist.github.com/leemcalilly/6e01ff8b86b1bdd078ed</a></li> <li>controllers/employees_controller.rb - <a href="https://gist.github.com/leemcalilly/ad8d9f696b3121fd20e8" rel="nofollow">https://gist.github.com/leemcalilly/ad8d9f696b3121fd20e8</a></li> <li>models/checkout.rb - <a href="https://gist.github.com/leemcalilly/6ffb28d54c6ea896bac5" rel="nofollow">https://gist.github.com/leemcalilly/6ffb28d54c6ea896bac5</a></li> <li>models/employee.rb - <a href="https://gist.github.com/leemcalilly/85f53606494743e3d3b1" rel="nofollow">https://gist.github.com/leemcalilly/85f53606494743e3d3b1</a></li> <li>models/employment.rb - <a href="https://gist.github.com/leemcalilly/b9f9c8b750a23c8f3611" rel="nofollow">https://gist.github.com/leemcalilly/b9f9c8b750a23c8f3611</a></li> <li>views/checkouts/_form.html.erb - <a href="https://gist.github.com/leemcalilly/d148d00345ad656fcd75" rel="nofollow">https://gist.github.com/leemcalilly/d148d00345ad656fcd75</a></li> <li>views/checkouts/index.html.erb - <a href="https://gist.github.com/leemcalilly/95f19b23ed121e40f73d" rel="nofollow">https://gist.github.com/leemcalilly/95f19b23ed121e40f73d</a></li> <li>views/checkouts/show.html.erb - <a href="https://gist.github.com/leemcalilly/64ef85f66aa5d887489d" rel="nofollow">https://gist.github.com/leemcalilly/64ef85f66aa5d887489d</a></li> </ul> <p>Still not quite understanding why this worked though.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload