aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-03-27 14:04:06 +0000
committerRick Olson <technoweenie@gmail.com>2007-03-27 14:04:06 +0000
commit2a305949d756c054cee349c1ef3b39c6cf1496f8 (patch)
tree6de4aa3106b92e128a6b62dae9938b73a1f7ed03 /railties
parent4b78a2a245cb69e958e3d62d4c0e6fcab2eb3e76 (diff)
downloadrails-2a305949d756c054cee349c1ef3b39c6cf1496f8.tar.gz
rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.tar.bz2
rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.zip
documentation project patches, closes #7342, #7319, #7316, #7190 [jeremymcanally]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/initializer.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb2
3 files changed, 5 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 9eff591e53..73378b9c4e 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Give generate scaffold a more descriptive database message. Closes #7316 [jeremymcanally]
+
* Canonicalize RAILS_ROOT by using File.expand_path on Windows, which doesn't have to worry about symlinks, and Pathname#realpath elsewhere, which respects symlinks in relative paths but is incompatible with Windows. #6755 [Jeremy Kemper, trevor]
* Deprecation: remove components from controller paths. [Jeremy Kemper]
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 15ae80f1cf..4f09dd45a3 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -205,7 +205,9 @@ module Rails
silence_warnings do
config = configuration
constants = self.class.constants
+
eval(IO.read(configuration.environment_path), binding, configuration.environment_path)
+
(self.class.constants - constants).each do |const|
Object.const_set(const, self.class.const_get(const))
end
diff --git a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
index df622f7eee..855f9119d5 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
@@ -173,7 +173,7 @@ class ScaffoldGenerator < Rails::Generator::NamedBase
sandbox.model_instance = model_instance
sandbox.instance_variable_set("@#{singular_name}", sandbox.model_instance)
rescue ActiveRecord::StatementInvalid => e
- logger.error "Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name})"
+ logger.error "Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name}) named #{class_name.tableize}."
raise SystemExit
end
sandbox.suffix = suffix