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

Add :contact_form_id to messages params in messages_controller #2403

Merged
merged 6 commits into from
Jan 18, 2023
Merged

Add :contact_form_id to messages params in messages_controller #2403

merged 6 commits into from
Jan 18, 2023

Conversation

chiperific
Copy link
Contributor

@chiperific chiperific commented Dec 20, 2022

What is this pull request for?

Messages controller fix:

From: params.require(:message).permit(*mailer_config["fields"])
To: params.require(:message).permit(*mailer_config["fields"], :contact_form_id)

Why

The Message model requires a :contact_form_id to lookup an Element

Closes #2402

Notable changes

contact_form_mail templates and replace with a single, truly bare template.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added / fixed tests to cover this change

… certain attributes that developers may remove. Replace the templates with a single file.
… contact_form_mail.text.erb is a true empty template.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Instead of removing the mailer templates we should update the documentation. Also a test for the mailers controller would be necessary.

Note: The PR title is not very descriptive and the commit message for the contact_form_id misses a "why" in the commit body. It would be helpful to have a goog PR title and for future selfs, to have a good git commit message.

spec/mailers/alchemy/messages_mailer_spec.rb Outdated Show resolved Hide resolved
@chiperific chiperific changed the title Messages Add :contact_form_id to messages params in messages_controller Dec 22, 2022
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@tvdeyen tvdeyen merged commit 4bb857e into AlchemyCMS:main Jan 18, 2023
@chiperific chiperific deleted the messages branch January 19, 2023 17:08
dbwinger pushed a commit to dbwinger/alchemy_cms that referenced this pull request Mar 20, 2023
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 this pull request may close these issues.

messages controller always throws error on :contact_form_id
2 participants