Sha256: 81e4279896387a3d8630fe2d00fe1daa31800d0e6dd4a6dfc27f460b015c15c6
Contents?: true
Size: 741 Bytes
Versions: 2
Compression:
Stored size: 741 Bytes
Contents
module Desert module Rails module RouteSet # Loads the set of routes from within a plugin and evaluates them at this # point within an application's main <tt>routes.rb</tt> file. # # Plugin routes are loaded from <tt><plugin_root>/desert_routes.rb</tt>. def routes_from_plugin(name) name = name.to_s routes_path = File.join( Desert::Manager.plugin_path(name), "config/desert_routes.rb" ) RAILS_DEFAULT_LOGGER.debug "Loading routes from #{routes_path}." eval(IO.read(routes_path), binding, routes_path) if File.file?(routes_path) end end end end class ActionController::Routing::RouteSet::Mapper include Desert::Rails::RouteSet end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
joshnabbott-desert-0.3.5.2 | lib/desert/rails/route_set.rb |
joshnabbott-desert-0.3.5.3 | lib/desert/rails/route_set.rb |