加载plugins中的controller和model
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# Include hook code here require 'act_as_favor' # make plugin controller, model, helper available to app config.load_paths += %W(#{ActAsFavor::PLUGIN_CONTROLLER_PATH} #{ActAsFavor::PLUGIN_HELPER_PATH} #{ActAsFavor::PLUGIN_MODELS_PATH}) Rails::Initializer.run(:set_load_path, config) # require the controller require 'favors_controller' # require models require 'favor' |
Posted by holin At May 15, 2008 15:36
请登录以发表评论。