In my Rails app, I'm using the gem rails-settings to save a user's email notification settings. I'm trying to create a form to update a user's notification settings. It should consist of a set of checkboxes where the user selects what they want to receive email notifications about.
In the rails-setting README, there are no examples of how to integrate it with a form. The closest tutorial I found was listed in the issues:
https://github.com/ledermann/rails-settings/issues/46
But I'm not sure what the actual form element would look like in my view. For example, if I wanted to create an input that looked something like this:
<input name="settings[email][comments]" type="textbox" value="1">
How do I generate this using a rails form helper?
This is how I created the form. Hope this helps someone else.
edit.html.erb
registrations_controller.rb