Skip to content

Instantly share code, notes, and snippets.

@lachie
Created August 28, 2008 09:32
Show Gist options
  • Save lachie/7690 to your computer and use it in GitHub Desktop.
Save lachie/7690 to your computer and use it in GitHub Desktop.
def load_rails_plugin(name)
Merb::BootLoader.before_app_loads do
root = Merb.root / "lib" / name
puts "root: #{root}"
$: << (root / 'lib')
Dependencies.load_paths << (root / 'lib')
require root / "init.rb"
end
end
load_rails_plugin('acts_as_paranoid')
load_rails_plugin('acts_as_state_machine')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment