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
上级 2af41fc0
......@@ -257,6 +257,5 @@ def self.draw(*args, &block)
end
Routes = RouteSet.new
Routes.reload # Server will die on load if SyntaxError
end
end
\ No newline at end of file
end
*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
......
......@@ -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:
......@@ -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:
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册