Skip to content
This repository
Browse code

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
@@ -257,6 +257,5 @@ def self.draw(*args, &block)
257 257 end
258 258
259 259 Routes = RouteSet.new
260   - Routes.reload # Server will die on load if SyntaxError
261 260 end
262   -end
  261 +end
10 activerecord/CHANGELOG
... ... @@ -1,5 +1,15 @@
1 1 *SVN*
2 2
  3 +* Added validates_each that validates each specified attribute against a block #610 [bitsweat]. Example:
  4 +
  5 + class Person < ActiveRecord::Base
  6 + validates_each :first_name, :last_name do |record, attr|
  7 + record.errors.add attr, 'starts with z.' if attr[0] == ?z
  8 + end
  9 + end
  10 +
  11 +* 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]
  12 +
3 13 * Added that validates_* now accept blocks to perform validations #618 [Tim Bates]. Example:
4 14
5 15 class Person < ActiveRecord::Base
2  railties/environments/shared.rb
@@ -60,6 +60,6 @@
60 60 [ActionController::Base, ActionMailer::Base].each do |klass|
61 61 klass.template_root ||= "#{RAILS_ROOT}/app/views/"
62 62 end
63   -
  63 +ActionController::Routing::Routes.reload
64 64
65 65 # Include your app's configuration here:
2  railties/environments/shared_for_gem.rb
@@ -56,6 +56,6 @@
56 56 [ActionController::Base, ActionMailer::Base].each do |klass|
57 57 klass.template_root ||= "#{RAILS_ROOT}/app/views/"
58 58 end
59   -
  59 +ActionController::Routing::Routes.reload
60 60
61 61 # Include your app's configuration here:

0 comments on commit e39bf10

Please sign in to comment.
Something went wrong with that request. Please try again.