aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-12-27 00:43:27 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-12-27 00:43:27 +0000
commit014fdde93a7ebdcea79d27667c4a89c65e81cc6b (patch)
tree5a4496c204999e997fc90a8597ecf0711a928674 /railties
parentd88e83f211e47a8fa8220c880cf7a7309e552503 (diff)
downloadrails-014fdde93a7ebdcea79d27667c4a89c65e81cc6b.tar.gz
rails-014fdde93a7ebdcea79d27667c4a89c65e81cc6b.tar.bz2
rails-014fdde93a7ebdcea79d27667c4a89c65e81cc6b.zip
Attempt at fixing the preparation_callbacks, nzkoz will double check
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/dispatcher.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb
index b0ddd29cd3..c121923da1 100644
--- a/railties/lib/dispatcher.rb
+++ b/railties/lib/dispatcher.rb
@@ -25,9 +25,7 @@
# to the appropriate controller and action. It also takes care of resetting
# the environment (when Dependencies.load? is true) after each request.
class Dispatcher
-
class << self
-
# Dispatch the given CGI request, using the given session options, and
# emitting the output via the given output. If you dispatch with your
# own CGI object be sure to handle the exceptions it raises on multipart
@@ -89,8 +87,8 @@ class Dispatcher
end
private
-
- attr_accessor :preparation_callbacks, :preparation_callbacks_run
+ attr_accessor_with_default :preparation_callbacks, []
+ attr_accessor_with_default :preparation_callbacks_run, false
alias_method :preparation_callbacks_run?, :preparation_callbacks_run
# CGI.new plus exception handling. CGI#read_multipart raises EOFError
@@ -162,10 +160,6 @@ class Dispatcher
end
end
end
-
- self.preparation_callbacks ||= []
- self.preparation_callbacks_run = false
-
end
Dispatcher.to_prepare :activerecord_instantiate_observers do