Loads the set of routes from within a plugin and evaluates them at this point within an application’s main routes.rb file.
Plugin routes are loaded from <plugin_root>/routes.rb.
# File vendor/plugins/ubiquo_core/lib/ubiquo/extensions/routing.rb, line 8
8: def from_plugin(name, options = {})
9: # At the point in which routing is loaded, we cannot guarantee that all
10: # plugins are in Rails.plugins, so instead we need to use find_plugin_path
11: self.with_options(options) do |map|
12: routes_path = Rails.root.join('vendor', 'plugins', name.to_s, 'config', 'plugin_routes.rb')
13: # logger.debug "loading routes from #{routes_path}"
14: eval(IO.read(routes_path), binding, routes_path) if File.file?(routes_path)
15: end
16: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.