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
This commit is contained in:
David Heinemeier Hansson 2005-02-17 23:03:48 +00:00
parent 2af41fc036
commit e39bf10594
4 changed files with 13 additions and 4 deletions

View File

@ -257,6 +257,5 @@ module ActionController
end
Routes = RouteSet.new
Routes.reload # Server will die on load if SyntaxError
end
end

View File

@ -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

View File

@ -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:

View File

@ -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: