Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Loading the Routes should happen in the environments #655

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit e39bf105941133d3d6699c52c18dbd3b9aa0bf5c 1 parent 2af41fc
David Heinemeier Hansson dhh authored
3  actionpack/lib/action_controller/routing.rb
View
@@ -257,6 +257,5 @@ def self.draw(*args, &block)
end
Routes = RouteSet.new
- Routes.reload # Server will die on load if SyntaxError
end
-end
+end
10 activerecord/CHANGELOG
View
@@ -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
2  railties/environments/shared.rb
View
@@ -60,6 +60,6 @@
[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:
2  railties/environments/shared_for_gem.rb
View
@@ -56,6 +56,6 @@
[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:
Please sign in to comment.
Something went wrong with that request. Please try again.