Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messages controller always throws error on :contact_form_id #2402

Closed
chiperific opened this issue Dec 20, 2022 · 2 comments · Fixed by #2403
Closed

messages controller always throws error on :contact_form_id #2402

chiperific opened this issue Dec 20, 2022 · 2 comments · Fixed by #2403

Comments

@chiperific
Copy link
Contributor

Steps to reproduce

Follow the guide to create a contact form

Problem

Alchemy::MessagesController#message_params never gets :contact_form_id added to the .permit() array.

Fix:

# messages_controller.rb

...
# ensure :contact_form_id is added
def message_params
  params.require(:message).permit(*mailer_config["fields"], :contact_form_id)
end
@chiperific
Copy link
Contributor Author

mailer_config['fields'] pulls straight from the config.yml file, even the default file has no contact_form_id field included. So this can't be working for anyone?

@tvdeyen
Copy link
Member

tvdeyen commented Dec 20, 2022

Yeah. I am pretty sure nobody uses this feature. We will probably extract this into a separate gem. If you want to open a PR that adds the missing key into the controller we will merge it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants