aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/routing.rb3
-rw-r--r--activerecord/CHANGELOG10
-rw-r--r--railties/environments/shared.rb2
-rw-r--r--railties/environments/shared_for_gem.rb2
4 files changed, 13 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 84dd29e8eb..f08e23b72e 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -257,6 +257,5 @@ module ActionController
end
Routes = RouteSet.new
- Routes.reload # Server will die on load if SyntaxError
end
-end \ No newline at end of file
+end
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index d05ecfbe31..95962f74b6 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,15 @@
*SVN*
+* Added validates_each that validates each specified attribute against a block #610 [bitsweat]. Example:
+
+ class Person < ActiveRecord::Base
+ validates_each :first_name, :last_name do |record, attr|
+ record.errors.add attr, 'starts with z.' if attr[0] == ?z
+ end
+ end
+
+* Added :allow_nil as an explicit option for validates_length_of, so unless that's set to true having the attribute as nil will also return an error if a range is specified as :within #610 [bitsweat]
+
* Added that validates_* now accept blocks to perform validations #618 [Tim Bates]. Example:
class Person < ActiveRecord::Base
diff --git a/railties/environments/shared.rb b/railties/environments/shared.rb
index 2d37714831..9b261ba59e 100644
--- a/railties/environments/shared.rb
+++ b/railties/environments/shared.rb
@@ -60,6 +60,6 @@ end
[ActionController::Base, ActionMailer::Base].each do |klass|
klass.template_root ||= "#{RAILS_ROOT}/app/views/"
end
-
+ActionController::Routing::Routes.reload
# Include your app's configuration here:
diff --git a/railties/environments/shared_for_gem.rb b/railties/environments/shared_for_gem.rb
index 057f664396..6ee762de6a 100644
--- a/railties/environments/shared_for_gem.rb
+++ b/railties/environments/shared_for_gem.rb
@@ -56,6 +56,6 @@ end
[ActionController::Base, ActionMailer::Base].each do |klass|
klass.template_root ||= "#{RAILS_ROOT}/app/views/"
end
-
+ActionController::Routing::Routes.reload
# Include your app's configuration here: