aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/railtie.rb
Commit message (Collapse)AuthorAgeFilesLines
* fixing mailer previews for apps with globbing routeOleg2014-12-031-1/+1
|
* [ActionMailer] require activejob railtieAbdelkader Boudih2014-08-221-0/+1
|
* Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-301-1/+1
| | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
* Rename preview_enabled option to show_previewsRafael Mendonça França2014-07-011-3/+3
|
* Add configuration to enable mail previewsLeonard Garvey2014-07-011-1/+9
| | | | | | | | | | | | | | | | | | Adds `config.action_mailer.preview_enabled` This allows mail previewing to be enabled easily in non-development environments such as staging. The default is set to true for development so no changes should be required to existing Rails applications. The mail preview path can still be configured using the existing `config.action_mailer.preview_path` configuration option. Adding this avoids devs from having to do stuff like: https://gist.github.com/lengarvey/fa2c9bd6cdbeba96526a Update actionmailer/CHANGELOG with new configuration. Update configuring guide with new configuratation. Add `config.action_mailer.preview_path` to configuring guide.
* allow preview interceptors to be registered through `config.action_mailer`.Yves Senn2014-06-151-0/+1
| | | | | | | | | | | | | | | This was partially broken because `preview_interceptors=` just assigned the raw values, whithout going through `register_preview_interceptor`. Now the Action Mailer railtie takes care of the `preview_interceptors` option. This commit is a partial revert of: Revert "Merge pull request #15739 from y-yagi/correct_doc_for_action_mailer_base" This reverts commit a15704d7f35f17d34d0118546799141d6f853656, reversing changes made to 1bd12a8609d275ad75fcc4b622ca4f5b32dc76be. /cc @kuldeepaggarwal @y-yagi
* Don't use a class_attribute for ActionMailer::Base.preview_pathAndrew White2014-01-261-1/+1
| | | | | Since preview_path is read from ActionMailer::Base when previewing, subclasses can’t change it so don’t there's no need for the extra overhead imposed by using it.
* Add preview_path to autoload_paths in after_initializeAndrew White2014-01-041-5/+7
| | | | | | | | | | Only config.autoload_paths is frozen, so add the preview_path to ActiveSupport::Dependencies.autoload_paths directly in an after_initialize block. Also protect against a blank preview_path being added to autoload_paths which can cause a serious slowdown as Dir[] tries to load all *_preview.rb files under / Fixes #13372
* Add mailer previews feature based on mail_view gemAndrew White2013-12-171-0/+8
|
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-211-2/+0
| | | | with Rails 4.0.
* Remove old asset_path from rails configJoshua Peek2012-10-151-1/+0
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes.
| * update ActionMailer documentation [ci skip]Francesco Rodriguez2012-09-171-1/+1
| |
* | Allow users to configure the queue for the mailersRafael Mendonça França2012-09-121-0/+2
|/ | | | | | | | | | | | This allow the users to do: config.action_mailer.queue = MyQueue.new and class UsersMailer < ActionMailer::Base self.queue = MyQueue.new end
* Get rid of config.preload_frameworks in favor of config.eager_load_namespacesJosé Valim2012-08-211-0/+1
| | | | | | | The new option allows any Ruby namespace to be registered and set up for eager load. We are effectively exposing the structure existing in Rails since v3.0 for all developers in order to make their applications thread-safe and CoW friendly.
* Default relative_url_root to ENV["RAILS_RELATIVE_URL_ROOT"]. Fixes #3365Piotrek Okoński2011-12-121-2/+3
|
* remove AM delegating register_observer and register_interceptor to Mail and ↵Josh Kalderimis2011-04-041-2/+6
| | | | | | instead implement smarter versions allowing for string class names, also added proper Railtie support with tests. Signed-off-by: José Valim <jose.valim@gmail.com>
* Clean up asset_host and asset_path.José Valim2010-12-091-2/+2
|
* Provide a cleaner syntax for paths configuration that does not rely on ↵José Valim2010-10-061-3/+3
| | | | method_missing.
* Call it compile_methods! and do the same on AM.José Valim2010-09-271-0/+10
|
* Do not require passing :app to mounted helpers, it's actually useless and ↵Piotr Sarnacki2010-09-081-1/+1
| | | | not DRY
* Set only helpers_path on inherited hook in action_controller/railtie.rb and ↵Piotr Sarnacki2010-09-031-3/+6
| | | | use helper(:all) just after that
* Moved ActionMailer and ActionController railties options to inherited hookPiotr Sarnacki2010-09-031-6/+3
| | | | | | | | | | | This change is needed, because we must take namespace into account and if controller's/mailer's class is namespaced, engine's paths should be set instead of application's ones. The nice side effect of this is removing unneeded logic in ActionController::Base.inherited - now the helpers_path should be set correctly even for engine's controllers, so helper(:all) will always include correct helpers.
* ActionMailer should not depend on ActionDispatchPiotr Sarnacki2010-09-031-0/+1
|
* Move ActionController::Railties::RoutesHelpers and ↵Piotr Sarnacki2010-09-031-2/+2
| | | | ActionMailer::Railties::RoutesHelper to AbstractController::Railties::RoutesHelpers
* Include routes helpers only for inherited classes in ActionMailerPiotr Sarnacki2010-09-031-2/+1
|
* Include application's helpers and router helpers by default, but include ↵Piotr Sarnacki2010-09-031-0/+2
| | | | engine's ones for controllers inside isolated namespace
* mounted helpers should be included in ActionMailerPiotr Sarnacki2010-09-031-1/+2
|
* Clean up AM and AC railties.José Valim2010-07-241-11/+6
|
* Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing ↵José Valim2010-06-241-3/+0
| | | | frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
* Extract assets paths and make them available to Action Mailer as wellDavid Heinemeier Hansson2010-06-021-0/+9
|
* Remove the need for a special action_mailer.url_for initializer that loads ↵wycats2010-05-151-4/+2
| | | | before anything else
* Replace the placeholder base_hook API with on_load. To specify some code thatwycats2010-03-291-3/+3
| | | | | | | | should run during framework load do: ActiveSupport.on_load(:action_controller) do # Code run in the context of AC::Base end
* Move application configuration to the application configuration object, ↵José Valim2010-03-261-2/+2
| | | | remove railtie_name and engine_name and allow to set the configuration object.
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-4/+6
| | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
* Get the railties tests to pass again.Carlhuda2010-03-021-5/+0
|
* Moved initializers for ActionMailer and ActionController into their own railtiesCarlhuda2010-03-021-0/+5
|
* Rename named_url_helpers to url_helpers and url_helpers to url_forCarlhuda2010-02-261-1/+1
|
* Get Railties tests passingCarlhuda2010-02-251-1/+1
|
* Rename Rails::Subscriber to Rails::LogSubscriberPrem Sichanugrist2010-02-161-2/+2
|
* install ActionController::UrlFor before environment is parsed, to provide ↵Paul Rosania2010-02-051-5/+5
| | | | | | ActionMailer#default_url_options= Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Rationalize railtie dependencies: AC uses AV; AR uses AMo; and Rails always ↵Jeremy Kemper2010-02-041-1/+1
| | | | uses AS.
* ActionMailer should depend just on AbstractController.José Valim2010-01-291-0/+4
|
* Add active_model/railtie back to generated boot.rb, add models back to ↵José Valim2010-01-251-5/+4
| | | | paths, load active_support/railtie since we need it and ensure default logger is set before config.
* Rename plugin_name to railtie_name and engine_name.José Valim2010-01-241-1/+1
|
* Moved more configuration away from bootstrap.José Valim2010-01-221-5/+0
|
* Add view paths to Engine setup.José Valim2010-01-221-2/+1
|
* Add subscriber to ActionMailer.José Valim2010-01-141-0/+3
|
* Some railties cleanup:Carl Lerche2009-12-311-0/+25
* Rename <framework>/rails.rb -> <framework>/railtie.rb * Rails::Plugin -> Rails::Railtie * Rails::Plugin::Vendored -> Rails::Plugin