Recent changes in routes

I’m writing a plugin that automatically creates a named route buy
hijacking RouteSet’s draw method. This no longer seems to work in
edge rails. Anyone know what changes in routes effected this and what
the preferred way would be now to automatically include route?

Here’s the code that used to work:

class ActionController::Routing::RouteSet
alias_method :__draw, :draw
def draw
old_routes = @routes
@routes = []
begin
create_rcss_routes
yield self
rescue
@routes = old_routes
raise
end
write_generation
write_recognition
end
def create_rcss_routes
named_route ‘plugin’, “/
controller/:plugin”, :controller=>‘controller’, :action=>‘plugin’
end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs