开发者

require path for plugins in rails 3

开发者 https://www.devze.com 2023-01-31 02:09 出处:网络
There is a plugin in here: myproject\\vendor\\plugins\\myplugin How can i activate this plugin? what shou开发者_StackOverflow社区ld i write? I actually don\'t think you need to require anything.

There is a plugin in here:

myproject\vendor\plugins\myplugin

How can i activate this plugin? what shou开发者_StackOverflow社区ld i write?


I actually don't think you need to require anything.

EDIT: As @Ryan Bigg said, if your plugin has either a init.rb or plugin_name.rb file, it will be automatically loaded. This goes without saying that you should require your plugin's files from within that file.

0

精彩评论

暂无评论...
验证码 换一张
取 消