aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
Commit message (Collapse)AuthorAgeFilesLines
* Freeze fragment cache related instrument name.Stan Lo2017-02-071-1/+1
| | | | | | | | | | | | | ActionMailer::Base#instrument_name and ActionController::Base#instrument_name will be frequently called once caching is enabled. So it's better to freeze them instead of create new string on every call. Also, the instrument name in #instrument_fragment_cache will usually be "write_fragment.action_controller" or "read_fragment.action_controller". So freezing them might also gain some performance improvement. We have done something like this in other places: https://github.com/rails/rails/blob/master/actionview/lib/action_view/template.rb#L348
* Add `:args` to `process.action_mailer` eventyuuji.yaginuma2017-02-043-1/+25
|
* Don't mutate raw_source in mailer preview interceptorEugene Kenny2017-01-301-5/+1
| | | | | | | | The raw_source method is documented as returning the exact value that was used to create the body; mutating it breaks that contract. Additionally, if the value used to create the body is blank, raw_source returns a frozen string which causes the interceptor to raise an error.
* add default value to `deliver_later_queue_name` option [ci skip]yuuji.yaginuma2017-01-311-1/+1
|
* Document with with an example an link to ParameterizedRafael Mendonça França2017-01-301-1/+6
| | | | | Also change the class_methods to ClassMethods since the former document the method as an instance method of Parameterized not as a class method.
* :scissors:Rafael Mendonça França2017-01-301-1/+1
|
* No need to advertise in the rdoc documentationRafael Mendonça França2017-01-301-3/+0
|
* Avoid should in test namesRafael Mendonça França2017-01-301-1/+1
|
* Implement respond_to_missing? in the Parameterized::Mailer classRafael Mendonça França2017-01-302-6/+25
|
* Remove unneeded nodocRafael Mendonça França2017-01-301-1/+1
|
* Override the initializers instead of using tapRafael Mendonça França2017-01-301-3/+6
| | | | We own the class so we can override the initialize.
* Make internal classes internal for the documentationRafael Mendonça França2017-01-301-2/+2
|
* Make assert_enqueued_emails + assert_no_enqueued_emails consider ↵David Heinemeier Hansson2017-01-302-2/+20
| | | | | | parameterized delivery jobs Needed for testing of parameterized mailers
* [ci skip] other -> order; expand ivarKasper Timm Hansen2017-01-281-1/+2
|
* restore `delivery_method` after testyuuji.yaginuma2017-01-291-4/+1
| | | | | Currently use two variables to restore `delivery_method`, but the order of restoring the values is incorrect and does not restore is correctly.
* Offer the option to use parameterization for shared processing of headers ↵David Heinemeier Hansson2017-01-286-7/+212
| | | | | and ivars (#27825) Offer the option to use parameterization for shared processing of headers and ivars
* Don't pollute Object with rubinius_skip and jruby_skipAkira Matsuda2017-01-171-9/+9
| | | | we call them only in the tests
* ZOMG worst typo in my life :scream:Akira Matsuda2017-01-151-1/+1
|
* `respond_to_missing?` should fallback to `super` where method_missing could ↵Akira Matsuda2017-01-151-1/+1
| | | | call `super`
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-122-7/+7
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* Use Encoding::UTF_8 constant for default_{internal,external} in the testsAkira Matsuda2017-01-111-2/+2
|
* Merge pull request #27227 from MQuy/allow-custom-content-type-in-mail-bodyRafael Mendonça França2017-01-063-4/+38
|\ | | | | | | Allow to custom content type when setting mailer body
| * Remove unnecessary condition in content_typeMQuy2017-01-061-1/+1
| |
| * Add document in mailerMQuy2016-12-061-0/+13
| |
| * Fix wrong typo in testMQuy2016-12-051-1/+1
| |
| * Add changelog for custom content typeMQuy2016-12-011-0/+12
| |
| * allow context type when set body mailMQuy2016-11-302-4/+13
| |
* | `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-054-4/+4
| | | | | | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* | Revert "Merge pull request #27550 from ↵Rafael Mendonça França2017-01-031-1/+1
| | | | | | | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine" This reverts commit 1e969bfb98b88799e2c759fce25a1d8cf00d7ce7, reversing changes made to a5041f267ded119c2d00b8786c2f2c1e3f93c8a1. Reason: It breaks the public API
* | Merge pull request #27550 from ↵Rafael França2017-01-031-1/+1
|\ \ | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine Fix generator command for nested (namespaced) rails engine
| * | Fix generator command for nested (namespaced) rails engineFumiaki MATSUSHIMA2017-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we create nested (namespaced) rails engine such like bukkits-admin, `bin/rails g scaffold User name:string age:integer` will create `bukkits-admin/app/controllers/bukkits/users_controller.rb` but it should create `bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`. In #6643, we changed `namespaced_path` as root path because we supposed application_controller is always in root but nested rails engine's application_controller will not.
* | | Remove unneeded Deprecation.silenceRafael Mendonça França2017-01-031-3/+1
|/ /
* | Bump license years for 2017Jon Moss2016-12-312-2/+2
| | | | | | | | | | | | | | | | Per https://www.timeanddate.com/counters/firstnewyear.html, it's already 2017 in a lot of places, so we should bump the Rails license years to 2017. [ci skip]
* | Privatize unneededly protected methods in Action MailerAkira Matsuda2016-12-244-27/+20
| |
* | No need to nodoc private methodAkira Matsuda2016-12-241-1/+1
| |
* | Privatize unneededly protected methods in Action Mailer testsAkira Matsuda2016-12-243-3/+3
|/
* update bin/test scripts to prevent double runs.Yves Senn2016-11-211-2/+0
| | | | | The test runner was updated to make use of autorun. This caused the `bin/test` scripts to run Minitest twice.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-299-19/+19
|
* Remove deprecated support to :text in renderRafael Mendonça França2016-10-103-6/+6
|
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-15/+15
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-4/+5
|
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-011-1/+1
|
* Add load hooks to all tests classesRafael Mendonça França2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Usually users extends tests classes doing something like: ActionView::TestCase.include MyCustomTestHelpers This is bad because it will load the ActionView::TestCase right aways and this will load ActionController::Base making its on_load hooks to execute early than it should. One way to fix this is using the on_load hooks of the components like: ActiveSupport.on_load(:action_view) do ActionView::TestCase.include MyCustomTestHelpers end The problem with this approach is that the test extension will be only load when ActionView::Base is loaded and this may happen too late in the test. To fix this we are adding hooks to people extend the test classes that will be loaded exactly when the test classes are needed.
* Add three new rubocop rulesRafael Mendonça França2016-08-167-23/+23
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* prefer __dir__ over __FILE__ in File.expand_pathXavier Noria2016-08-111-1/+3
| | | | | | Thinking .. relative to files is not natural, we are used to think "parent of a directory", and we have __dir__ nowadays.
* revises more Lint/EndAlignment offensesXavier Noria2016-08-081-3/+3
|
* code gardening: removes redundant selfsXavier Noria2016-08-081-2/+2
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* Modify LogSubscriber for single partial's cache message.Stan Lo2016-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement naive partial caching mechanism. Add test for LogSubscriber Use ActionView::Base#log_payload to store log_subscriber's payload, so we can pass cache result into it. Fixed tests Remove useless settings Check if #log_payload exists before calling it. Because other classes also includes CacheHelper but don't have is attribute Use @log_payload_for_partial_reder instead of #log_payload to carry ActionView's payload. Update test's hash syntax Add configuration to enable/disable fragment caching logging Remove unless test and add new test to ensure cache info won't effect next rendering's log Move :enable_fragment_cache_logging config from ActionView to ActionPack Apply new config to tests Update actionview's changelog Update configuration guide Improve actionview's changelog Refactor PartialRenderer#render and log tests Mute subscriber's log instead of disabling instrumentation. Fix typo, remove useless comment and use new hash syntax Improve actionpack's log_subscriber test Fix rebase mistake Apply new config to all caching intstrument actions
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies remaining conventions across the projectXavier Noria2016-08-064-7/+5
|