From 298a0834e181c63e5c1165a11efa1f6947b536f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 7 Jul 2011 11:52:20 -0300 Subject: Just generate AR options if AR is enabled --- .../rails/app/templates/config/environments/development.rb.tt | 2 ++ .../rails/generators/rails/app/templates/config/environments/test.rb.tt | 2 ++ 2 files changed, 4 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt index afd7a31f02..3e0c29a587 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt @@ -22,8 +22,10 @@ # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin + <%- unless options.skip_active_record? -%> # Raise exception on mass assignment protection for ActiveRecord models config.active_record.mass_assignment_sanitizer = :strict + <%- end -%> # Do not compress assets config.assets.compress = false diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt index 9e83f5a336..80198cc21e 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt @@ -34,8 +34,10 @@ # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql + <%- unless options.skip_active_record? -%> # Raise exception on mass assignment protection for ActiveRecord models config.active_record.mass_assignment_sanitizer = :strict + <%- end -%> # Print deprecation notices to the stderr config.active_support.deprecation = :stderr -- cgit v1.2.3