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 support for multiple preview_path #16836

Closed

Conversation

camelmasa
Copy link

Hi guys.

I'd like to add support for multiple preview_path of ActionMailer. (It could configure only one directory path now.)

Because I think I'd like to configure it in Rails Engine.

For example.

initializer "spree.core.mailers_previews" do |app|
  app.config.action_mailer.preview_path << File.join(root, "test", "mailers", "previews")
end

@seuros
Copy link
Member

seuros commented Sep 8, 2014

cc @rafaelfranca @matthewd

@PapePathe
Copy link

+1

@rafaelfranca
Copy link
Member

Although I agree with the change I don't like the idea of setting an array to a configuration with singular name. Also I think we should use the Rails::Paths class to implement this. https://github.com/rails/rails/blob/8683396dd8c31c70ba9332586ee05889305fdde6/railties/lib/rails/engine.rb#L70-109

@camelmasa
Copy link
Author

@rafaelfranca Thanks for review. I'll update it.

@seuros seuros added this to the 4.2.0 milestone Sep 16, 2014
@seuros
Copy link
Member

seuros commented Sep 16, 2014

any update @camelmasa ?

@camelmasa camelmasa force-pushed the update-preview_path-for-multiple-path branch from cd69eea to 4f89fde Compare September 16, 2014 13:04
@camelmasa
Copy link
Author

@seuros I created some commits but there are some problems...

@camelmasa
Copy link
Author

@seuros Thanks a lot for review.

I thought other approach.

  • don't use ActionMailer::Base.preview_paths
  • Remove ActionMailer::Base.preview_path
  • use Rails::Paths

For example commit.
camelmasa@fecd129

I think this way is more simple... What do you think about this ?

@rafaelfranca rafaelfranca removed this from the 4.2.0 milestone Sep 25, 2014
drench added a commit to tablexi/nucore-open that referenced this pull request Sep 23, 2016
This adds a bulk email compose-and-send flow as an alternative to
exporting a CSV of recipients, and makes it available to global
administrators.

It includes:

* Renaming the bulk_email Searcher service object
* Porting bulk_email.js to CoffeeScript and refactoring into classes
* Refactoring the bulk_email controller
* Adding a new bulk email mailer, but without previews
  See rails/rails#16836 for more information about the problems
  Rails has in defining multiple mailer preview directories.
@attilahorvath
Copy link

Hey @camelmasa,

We would like to extend the functionality of this config option the same way you did.

Do you think it would be possible to apply your changes on edge Rails and see if the issues can be fixed?

@rails-bot
Copy link

rails-bot bot commented Dec 18, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@rails-bot rails-bot bot added the stale label Dec 18, 2019
@rails-bot rails-bot bot closed this Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants