aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-29 17:08:08 -0700
committerwycats <wycats@gmail.com>2010-03-29 17:08:50 -0700
commit4aded43b73ff94dbf06b4a2d2075651ce454e1d5 (patch)
tree6bac5b0c25e5186b6e92c04fb6e19550630bbe8a /activerecord/lib/active_record.rb
parent331327d3919a633679dd3f434d13173fa8df010f (diff)
downloadrails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.tar.gz
rails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.tar.bz2
rails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.zip
Replace the placeholder base_hook API with on_load. To specify some code that
should run during framework load do: ActiveSupport.on_load(:action_controller) do # Code run in the context of AC::Base end
Diffstat (limited to 'activerecord/lib/active_record.rb')
-rw-r--r--activerecord/lib/active_record.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb
index 5942640c85..8a1aa50e24 100644
--- a/activerecord/lib/active_record.rb
+++ b/activerecord/lib/active_record.rb
@@ -111,10 +111,10 @@ module ActiveRecord
autoload :TestCase
autoload :TestFixtures, 'active_record/fixtures'
+end
- base_hook do
- Arel::Table.engine = Arel::Sql::Engine.new(self)
- end
+ActiveSupport.on_load(:active_record) do
+ Arel::Table.engine = Arel::Sql::Engine.new(self)
end
I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' \ No newline at end of file