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

590 parameterize contact mailer #607

Merged

Conversation

MooseCowBear
Copy link
Collaborator

🔗 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 to Contact.new and ContactsMailer.with instead of each individually.

In the controller, I had to replace current_tenant.slug with Current.organization.slug to get it to work I think because the contacts controller doesn't include OrganizationScopable. Should contacts be scoped to the organization?

📷 Screenshots/Demos

@nsiwnf nsiwnf linked an issue Mar 31, 2024 that may be closed by this pull request
Copy link
Collaborator

@nsiwnf nsiwnf left a 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 👍

@kasugaijin kasugaijin merged commit bbc3b74 into rubyforgood:main Apr 4, 2024
5 checks passed
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix: Parameterize contact [org] mailer
3 participants