firstdraft / draft_generators

Rails generators that help beginners learn to program.
MIT License
2 stars 3 forks source link

params.fetch for checkbox #52

Open raghubetina opened 6 years ago

raghubetina commented 6 years ago

For starter:resource, to account for the problem caused by params.fetch when a checkbox is not checked, I include an extraneous <input>.

Instead, we should generate code

params.fetch("<%= attribute.column_name %>", "")

in the controller.