aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/environments/environment.rb2
-rw-r--r--railties/lib/initializer.rb3
-rw-r--r--railties/lib/tasks/documentation.rake4
-rw-r--r--railties/test/secret_key_generation_test.rb4
4 files changed, 7 insertions, 6 deletions
diff --git a/railties/environments/environment.rb b/railties/environments/environment.rb
index 0d818f8446..abdb863130 100644
--- a/railties/environments/environment.rb
+++ b/railties/environments/environment.rb
@@ -40,7 +40,7 @@ Rails::Initializer.run do |config|
# Make Time.zone default to the specified zone, and make Active Record store time values
# in the database in UTC, and return them converted to the specified local zone.
- # Run "rake -D time" for a list of tasks for finding time zone names. Uncomment to use default local time.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
config.time_zone = 'UTC'
# Your secret key for verifying cookie session data integrity.
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 008f1de8fa..74d2daa34b 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -488,7 +488,7 @@ Run `rake gems:install` to install the missing gems.
# If assigned value cannot be matched to a TimeZone, an exception will be raised.
def initialize_time_zone
if configuration.time_zone
- zone_default = Time.send!(:get_zone, configuration.time_zone)
+ zone_default = Time.__send__(:get_zone, configuration.time_zone)
unless zone_default
raise %{Value assigned to config.time_zone not recognized. Run "rake -D time" for a list of tasks for finding appropriate time zone names.}
end
@@ -784,7 +784,6 @@ Run `rake gems:install` to install the missing gems.
def threadsafe!
self.cache_classes = true
self.dependency_loading = false
- self.active_record.allow_concurrency = true
self.action_controller.allow_concurrency = true
self
end
diff --git a/railties/lib/tasks/documentation.rake b/railties/lib/tasks/documentation.rake
index f4927a0ef1..4ef838626a 100644
--- a/railties/lib/tasks/documentation.rake
+++ b/railties/lib/tasks/documentation.rake
@@ -1,9 +1,9 @@
namespace :doc do
- desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb"
+ desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""
Rake::RDocTask.new("app") { |rdoc|
rdoc.rdoc_dir = 'doc/app'
rdoc.template = ENV['template'] if ENV['template']
- rdoc.title = "Rails Application Documentation"
+ rdoc.title = ENV['title'] || "Rails Application Documentation"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.options << '--charset' << 'utf-8'
rdoc.rdoc_files.include('doc/README_FOR_APP')
diff --git a/railties/test/secret_key_generation_test.rb b/railties/test/secret_key_generation_test.rb
index 2a04cff856..7269f98ce5 100644
--- a/railties/test/secret_key_generation_test.rb
+++ b/railties/test/secret_key_generation_test.rb
@@ -31,6 +31,8 @@ class SecretKeyGenerationTest < Test::Unit::TestCase
end
def test_secret_key_generation
- assert @generator.generate_secret.length >= SECRET_KEY_MIN_LENGTH
+ assert_deprecated /ActiveSupport::SecureRandom\.hex\(64\)/ do
+ assert @generator.generate_secret.length >= SECRET_KEY_MIN_LENGTH
+ end
end
end