aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-19 16:19:36 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-19 16:19:36 -0300
commit24bb8347b6ff0da90059314d9aece7a2c94a272c (patch)
treee6cf7a8695e4ccc87ef1df5f0ac8f6fb2752f2cc /railties
parentb8ef1d8abda8082f783fbf0db06f6d57630c1e07 (diff)
parentc7c2df2c63d2c5604b645a83c74fcd08d8b7a967 (diff)
downloadrails-24bb8347b6ff0da90059314d9aece7a2c94a272c.tar.gz
rails-24bb8347b6ff0da90059314d9aece7a2c94a272c.tar.bz2
rails-24bb8347b6ff0da90059314d9aece7a2c94a272c.zip
Merge pull request #16563 from arthurnn/add_ar_raise_trans_option
Add default .raise_in_transactional_callbacks option to template
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/application.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb
index 16fe50bab8..761e757d7f 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/application.rb
+++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -30,5 +30,10 @@ module <%= app_const_base %>
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
+
+ <%- unless options.skip_active_record? -%>
+ # For not swallow errors in after_commit/after_rollback callbacks.
+ config.active_record.raise_in_transactional_callbacks = true
+ <%- end -%>
end
end