Skip to content

Instantly share code, notes, and snippets.

@canadaduane
Created January 21, 2014 21:40
Show Gist options
  • Save canadaduane/8548959 to your computer and use it in GitHub Desktop.
Save canadaduane/8548959 to your computer and use it in GitHub Desktop.
# lib/account_with_account_domains.rb:
Account.class_eval do
# ...
end
# init.rb:
configure_method = Proc.new do
::ApplicationController.promote_view_path File.dirname(__FILE__)+'/app/views'
require_dependency 'account_with_account_domains'
end
if CANVAS_RAILS2
Rails.configuration.to_prepare(&configure_method)
else
class MyPluginRailtie < Rails::Railtie; end
MyPluginRailtie.config.to_prepare(&configure_method)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment