Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Dec 3, 2014
  1. @GBH
Commits on Aug 22, 2014
  1. @seuros
Commits on Jul 30, 2014
  1. @sgrif @schneems

    Deprecate `*_path` methods in mailers

    sgrif authored schneems committed
    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
Commits on Jul 1, 2014
  1. @rafaelfranca
  2. @lengarvey

    Add configuration to enable mail previews

    lengarvey authored
    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.
Commits on Jun 15, 2014
  1. @senny

    allow preview interceptors to be registered through `config.action_ma…

    senny authored
    …iler`.
    
    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 a15704d, reversing
    changes made to 1bd12a8.
    
    /cc @kuldeepaggarwal @y-yagi
Commits on Jan 26, 2014
  1. @pixeltrix

    Don't use a class_attribute for ActionMailer::Base.preview_path

    pixeltrix authored
    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.
Commits on Jan 4, 2014
  1. @pixeltrix

    Add preview_path to autoload_paths in after_initialize

    pixeltrix authored
    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
Commits on Dec 17, 2013
  1. @pixeltrix
Commits on Dec 22, 2012
  1. @jeremy
Commits on Oct 15, 2012
  1. @josh
Commits on Sep 21, 2012
  1. @vijaydev

    Merge branch 'master' of github.com:lifo/docrails

    vijaydev authored
    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.
Commits on Sep 18, 2012
  1. update ActionMailer documentation [ci skip]

    Francesco Rodriguez authored
Commits on Sep 12, 2012
  1. @rafaelfranca

    Allow users to configure the queue for the mailers

    rafaelfranca authored
    This allow the users to do:
    
        config.action_mailer.queue = MyQueue.new
    
    and
    
        class UsersMailer < ActionMailer::Base
          self.queue = MyQueue.new
        end
Commits on Aug 21, 2012
  1. @josevalim

    Get rid of config.preload_frameworks in favor of config.eager_load_na…

    josevalim authored
    …mespaces
    
    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.
Commits on Dec 12, 2011
  1. @pokonski
Commits on Apr 4, 2011
  1. @joshk @josevalim

    remove AM delegating register_observer and register_interceptor to Ma…

    joshk authored josevalim committed
    …il and 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>
Commits on Dec 9, 2010
  1. @josevalim
Commits on Oct 6, 2010
  1. @josevalim
Commits on Sep 27, 2010
  1. @josevalim
Commits on Sep 8, 2010
  1. @drogus
Commits on Sep 3, 2010
  1. @drogus

    Set only helpers_path on inherited hook in action_controller/railtie.…

    drogus authored
    …rb and use helper(:all) just after that
  2. @drogus

    Moved ActionMailer and ActionController railties options to inherited…

    drogus authored
    … hook
    
    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.
  3. @drogus
  4. @drogus

    Move ActionController::Railties::RoutesHelpers and ActionMailer::Rail…

    drogus authored
    …ties::RoutesHelper to AbstractController::Railties::RoutesHelpers
  5. @drogus
  6. @drogus

    Include application's helpers and router helpers by default, but incl…

    drogus authored
    …ude engine's ones for controllers inside isolated namespace
  7. @drogus
Commits on Jul 23, 2010
  1. @josevalim

    Clean up AM and AC railties.

    josevalim authored
Commits on Jun 24, 2010
  1. @josevalim

    Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing f…

    josevalim authored
    …rameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
Commits on Jun 2, 2010
  1. @dhh
Commits on May 15, 2010
  1. @wycats

    Remove the need for a special action_mailer.url_for initializer that …

    wycats authored
    …loads before anything else
Commits on Mar 30, 2010
  1. @wycats

    Replace the placeholder base_hook API with on_load. To specify some c…

    wycats authored
    …ode that
    
    should run during framework load do:
    
    ActiveSupport.on_load(:action_controller) do
      # Code run in the context of AC::Base
    end
Commits on Mar 26, 2010
  1. @josevalim

    Move application configuration to the application configuration objec…

    josevalim authored
    …t, remove railtie_name and engine_name and allow to set the configuration object.
Commits on Mar 7, 2010
  1. @wycats

    Make many parts of Rails lazy. In order to facilitate this,

    wycats authored
    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
Something went wrong with that request. Please try again.