-
Notifications
You must be signed in to change notification settings - Fork 123
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
590 parameterize contact mailer #607
Merged
kasugaijin
merged 15 commits into
rubyforgood:main
from
MooseCowBear:590-parameterize-contact-mailer
Apr 4, 2024
Merged
590 parameterize contact mailer #607
kasugaijin
merged 15 commits into
rubyforgood:main
from
MooseCowBear:590-parameterize-contact-mailer
Apr 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nsiwnf
approved these changes
Mar 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! I think we can do the scope-to-org in a separate PR 👍
ErinClaudio
pushed a commit
that referenced
this pull request
Apr 5, 2024
* commit annotation change * update contacts create route to use post and update url on contacts form * add tests for contacts * replace hardcoded url, add instance variable for org name to use in mailer * replace current_tenant because it was coming up nil * add scope to contact form and update controller action to use stong params * update tests to use correct params format * fix test desciptions
kasugaijin
added a commit
that referenced
this pull request
May 1, 2024
* Update with Image frontend buttons * Update with validations to model file * Bump debug from 1.9.1 to 1.9.2 Bumps [debug](https://github.com/ruby/debug) from 1.9.1 to 1.9.2. - [Release notes](https://github.com/ruby/debug/releases) - [Commits](ruby/debug@v1.9.1...v1.9.2) --- updated-dependencies: - dependency-name: debug dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Update images are saved but do not show yet * Update images now render on the index page but in no way are correct * Comment out section added to test to pass - THIS IS A TEMP THING THAT NEEDS TO BE UNDONE * Comment out section added X2 * Update hero image rendering as it should * docs: add jeevikasirwani as a contributor for code (#627) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * 590 parameterize contact mailer (#607) * commit annotation change * update contacts create route to use post and update url on contacts form * add tests for contacts * replace hardcoded url, add instance variable for org name to use in mailer * replace current_tenant because it was coming up nil * add scope to contact form and update controller action to use stong params * update tests to use correct params format * fix test desciptions * Small policy and factory fixes (#625) * Move constants outside of class * Add active staff requirement to InvitationPolicy * Correct StaffAccountPolicyTest file name * Add active staff requirement to StaffAccountPolicy * Refactor AdoptablePetPolicy rule to utilize allowed_to? instead of checking permissions directly to benefit from other policy's prechecks * Fix pets factory traits to associate has_ relationship objects correctly * Add relation_scope test for AdoptablePetPolicyTest * Fix factory trait to work with build strategy * docs: add jp524 as a contributor for code (#632) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * Staff Dashboard UI - Make hamburger functional to open/close sidebar (#631) * Add toggle Stimulus controller * Modify Geeks UI CSS * Add Org ID to resources to scope them (#614) Co-authored-by: Ben Robinson <[email protected]> * Update with partial * Update with Image frontend buttons * Update with validations to model file * Update images are saved but do not show yet * Update images now render on the index page but in no way are correct * Comment out section added to test to pass - THIS IS A TEMP THING THAT NEEDS TO BE UNDONE * Comment out section added X2 * Update hero image rendering as it should * Update with partial * Update with changes to partial * Update with a debuggin test * Update with a debuggin test * Update conflist clean up * Schema error clean-up * Syntax cleanup * Syntax cleanup * Update image upload causing major app error * Syntax cleanup * Error message for large file created * Error message for large file created * Merge conflict clean up * Update to notification * Cleanup of Readme * Cleanup of Readme2 * Cleanup of conflict * Cleanup of yml * Cleanup of tests * Removal of 'end' * Update to test * Update adjusted one test to pass * Update with test passing locally * Standardrb fix * 1 of 5 failing tests on CI should pass * Syntax cleanup * Update more failing tests on CI should pass * Update more failing tests on CI should pass * Standard - fix * Updated with hero text * Updated routes * Updated syntax and merge with main * Updated with text * Image add feature seems to work correctly * Controller method updates * Update with sytax fixes * Update with test refactor * Update with test refactor part 2 * Remove test changes in file * Remove test changes in file * Remove test changes in file * Testing changes in tests * Testing changes in tests * Update test passing --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Alisa <[email protected]> Co-authored-by: Ken Maeshima <[email protected]> Co-authored-by: Jade <[email protected]> Co-authored-by: Ben <[email protected]> Co-authored-by: Ben Robinson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 Issue
#590
✍️ Description
Replaces hard coded organization info with info from current org, and adds tests for mailer and contacts controller.
I also switched the route for the create action to use post instead of get, and added a scope to the new contact form to send parameters in the form that the strong params want so we can pass
contacts_params
toContact.new
andContactsMailer.with
instead of each individually.In the controller, I had to replace
current_tenant.slug
withCurrent.organization.slug
to get it to work I think because the contacts controller doesn't includeOrganizationScopable
. Should contacts be scoped to the organization?📷 Screenshots/Demos