forked from wycats/merb-plugins
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Use simple before_app_loads hook instead of bootloader subcla…
…ss." This reverts commit a15f43a.
- Loading branch information
1 parent
a15f43a
commit f67be72
Showing
2 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
if defined?(Merb::Plugins) | ||
if defined?(Merb::Plugins) | ||
dependency "activerecord" | ||
require File.join(File.dirname(__FILE__) / "merb" / "orms" / "active_record" / "connection") | ||
Merb::Plugins.add_rakefiles(File.join(File.dirname(__FILE__) / "active_record" / "merbtasks")) | ||
|
||
class Merb::Orms::ActiveRecord::Connect < Merb::BootLoader | ||
|
||
after BeforeAppLoads | ||
|
||
def self.run | ||
Merb::Orms::ActiveRecord.connect | ||
Merb::Orms::ActiveRecord.register_session_type | ||
end | ||
|
||
Merb::BootLoader.before_app_loads do | ||
Merb::Orms::ActiveRecord.connect | ||
Merb::Orms::ActiveRecord.register_session_type | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters