diff options
author | Arthur Neves <arthurnn@gmail.com> | 2014-08-19 13:56:55 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2014-08-19 13:56:55 -0400 |
commit | c7c2df2c63d2c5604b645a83c74fcd08d8b7a967 (patch) | |
tree | 6d0ddfc4f7ff876439bd98f0c182d0762d8d5aa1 /railties/lib/rails/generators | |
parent | 41231ef6c6c6a6e546b69add28f04aafb9e0e952 (diff) | |
download | rails-c7c2df2c63d2c5604b645a83c74fcd08d8b7a967.tar.gz rails-c7c2df2c63d2c5604b645a83c74fcd08d8b7a967.tar.bz2 rails-c7c2df2c63d2c5604b645a83c74fcd08d8b7a967.zip |
Add default .raise_in_transactional_callbacks option to template
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 5 |
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 |