Skip to content
Browse files

Always store UTC in the DB

  • Loading branch information...
1 parent ad52e4b commit d8af03a30921d192910b786d7d56745bb2b70639 @mike-burns mike-burns committed Aug 9, 2012
Showing with 8 additions and 0 deletions.
  1. +7 −0 lib/suspenders/app_builder.rb
  2. +1 −0 lib/suspenders/generators/app_generator.rb
View
7 lib/suspenders/app_builder.rb
@@ -99,6 +99,13 @@ def configure_rspec
inject_into_class 'config/application.rb', 'Application', generators_config
end
+ def configure_time_zone
+ time_zone_config = <<-RUBY
+ config.active_record.default_timezone = :utc
+ RUBY
+ inject_into_class "config/application.rb", "Application", time_zone_config
+ end
+
def configure_action_mailer
action_mailer_host 'development', "#{app_name}.local"
action_mailer_host 'test', 'example.com'
View
1 lib/suspenders/generators/app_generator.rb
@@ -111,6 +111,7 @@ def configure_app
build :configure_rspec
build :configure_action_mailer
build :generate_rspec
+ build :configure_time_zone
build :generate_cucumber, :webkit => options[:webkit]
build :setup_guard_spork
build :add_email_validator

0 comments on commit d8af03a

Please sign in to comment.
Something went wrong with that request. Please try again.